/**
  * Import help
  *
  * @access	public
  * @return	void
  **/
 public function help()
 {
     /* INIT */
     $vars = $this->getVars();
     $output = array();
     $errors = array();
     if (file_exists($this->app_full_path . 'xml/' . $vars['app_directory'] . '_help.xml')) {
         require_once IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php';
         $help = new admin_core_tools_help();
         $help->makeRegistryShortcuts($this->registry);
         $done = $help->helpFilesXMLImport_app($vars['app_directory']);
         $output[] = sprintf($this->lang->words['imported_x_help'], $done['added'] + $done['updated']);
     } else {
         $output[] = $this->lang->words['imported_no_help'];
     }
     /* Show redirect... */
     $this->showRedirectScreen($vars['app_directory'], $output, $errors, $this->getNextURL('settings', $vars));
 }
示例#2
0
 /**
  * Install ACP Help
  *
  * @return void
  */
 public function install_acphelp()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $previous = $_REQUEST['previous'];
     //-----------------------------------------
     // Fetch next 'un
     //-----------------------------------------
     $next = IPSSetUp::fetchNextApplication($previous, '{app}_help.xml', $this->settings['gb_char_set']);
     require_once IPS_KERNEL_PATH . 'classXML.php';
     /*noLibHook*/
     $xml = new classXML(IPSSetUp::charSet);
     //-----------------------------------------
     // Install Languages
     //-----------------------------------------
     if ($next['key']) {
         $_PATH = IPSLib::getAppDir($next['key']) . '/xml/';
         $output[] = $next['title'] . ": Upgrading Public Help...";
         if (is_file($_PATH . $next['key'] . '_help.xml')) {
             //-----------------------------------------
             // Do it..
             //-----------------------------------------
             require_once IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php';
             /*noLibHook*/
             $help = new admin_core_tools_help();
             $help->makeRegistryShortcuts($this->registry);
             $overwrite = IPSSetUp::getSavedData('helpfile') ? TRUE : FALSE;
             $done = $help->helpFilesXMLImport_app($next['key'], $overwrite);
             $output[] = $next['key'] . ": Добавлено " . $done['added'] . ", обновлено " . $done['updated'] . " файлов помощи";
         }
         //-----------------------------------------
         // Done.. so get some more!
         //-----------------------------------------
         $this->_finishStep($output, "Обновление: Система помощи", 'upgrade&do=acphelp&previous=' . $next['key']);
     } else {
         //-----------------------------------------
         // Next...
         //-----------------------------------------
         $output[] = "Все разделы помощи обновлены";
         $this->_finishStep($output, "Обновление: Система помощи", 'upgrade&do=other');
     }
 }
 /**
  * Install ACP Help
  *
  * @return void
  */
 public function install_acphelp()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $previous = $_REQUEST['previous'];
     //-----------------------------------------
     // Fetch next 'un
     //-----------------------------------------
     $next = IPSSetUp::fetchNextApplication($previous, '{app}_help.xml');
     /* Set up DB driver */
     $extra_install = $this->_setUpDBDriver(FALSE);
     require_once IPS_KERNEL_PATH . 'classXML.php';
     $xml = new classXML(IPSSetUp::charSet);
     //-----------------------------------------
     // Install Languages
     //-----------------------------------------
     if ($next['key']) {
         $output[] = $next['title'] . ": Inserting Public Help...";
         $_PATH = IPSLib::getAppDir($next['key']) . '/xml/';
         if (file_exists($_PATH . $next['key'] . '_help.xml')) {
             //-----------------------------------------
             // Adjust the table?
             //-----------------------------------------
             if ($extra_install and method_exists($extra_install, 'before_inserts_run')) {
                 $q = $extra_install->before_inserts_run('faq');
             }
             //-----------------------------------------
             // Do it..
             //-----------------------------------------
             require_once IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php';
             $help = new admin_core_tools_help();
             $help->makeRegistryShortcuts($this->registry);
             $done = $help->helpFilesXMLImport_app($next['key']);
             $output[] = $next['title'] . ": Added " . $done['added'] . " help files";
             //-----------------------------------------
             // Adjust the table?
             //-----------------------------------------
             if ($extra_install and method_exists($extra_install, 'after_inserts_run')) {
                 $q = $extra_install->after_inserts_run('faq');
             }
         }
         //-----------------------------------------
         // Done.. so get some more!
         //-----------------------------------------
         $this->_finishStep($output, "Install: Help System", 'install&do=acphelp&previous=' . $next['key']);
     } else {
         //-----------------------------------------
         // Next...
         //-----------------------------------------
         $output[] = "All help files installed";
         $this->_finishStep($output, "Install: Help System", 'install&do=other');
     }
 }
示例#4
0
 /**
  * Install ACP Help
  *
  * @return void
  */
 public function install_acphelp()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $previous = $_REQUEST['previous'];
     //-----------------------------------------
     // Fetch next 'un
     //-----------------------------------------
     $next = IPSSetUp::fetchNextApplication($previous, '{app}_help.xml', $this->settings['gb_char_set']);
     /* Set up DB driver */
     $extra_install = $this->_setUpDBDriver(FALSE);
     require_once IPS_KERNEL_PATH . 'classXML.php';
     /*noLibHook*/
     $xml = new classXML(IPSSetUp::charSet);
     //-----------------------------------------
     // Install Languages
     //-----------------------------------------
     if ($next['key']) {
         $output[] = $next['title'] . ": Добавление разделов помощи";
         $_PATH = IPSLib::getAppDir($next['key']) . '/xml/';
         if (is_file($_PATH . $next['key'] . '_help.xml')) {
             //-----------------------------------------
             // Adjust the table?
             //-----------------------------------------
             if ($extra_install and method_exists($extra_install, 'before_inserts_run')) {
                 $q = $extra_install->before_inserts_run('faq');
             }
             //-----------------------------------------
             // Do it..
             //-----------------------------------------
             require_once IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php';
             /*noLibHook*/
             $help = new admin_core_tools_help();
             $help->makeRegistryShortcuts($this->registry);
             $done = $help->helpFilesXMLImport_app($next['key']);
             $output[] = $next['title'] . ": Добавлено " . $done['added'] . " файлов помощи";
             //-----------------------------------------
             // Adjust the table?
             //-----------------------------------------
             if ($extra_install and method_exists($extra_install, 'after_inserts_run')) {
                 $q = $extra_install->after_inserts_run('faq');
             }
         }
         //-----------------------------------------
         // Done.. so get some more!
         //-----------------------------------------
         $this->_finishStep($output, "Установка: Система помощи", 'install&do=acphelp&previous=' . $next['key']);
     } else {
         //-----------------------------------------
         // Next...
         //-----------------------------------------
         $output[] = "Все файлы помощи добавлены";
         $this->_finishStep($output, "Установка: Система помощи", 'install&do=other');
     }
 }
 /**
  * Install ACP Help
  *
  * @return void
  */
 public function install_acphelp()
 {
     //-----------------------------------------
     // INIT
     //-----------------------------------------
     $previous = $_REQUEST['previous'];
     //-----------------------------------------
     // Fetch next 'un
     //-----------------------------------------
     $next = IPSSetUp::fetchNextApplication($previous, '{app}_help.xml');
     require_once IPS_KERNEL_PATH . 'classXML.php';
     $xml = new classXML(IPSSetUp::charSet);
     //-----------------------------------------
     // Install Languages
     //-----------------------------------------
     if ($next['key']) {
         $output[] = $next['title'] . ": Upgrading Public Help...";
         if (file_exists($_PATH . $next['key'] . '_help.xml')) {
             //-----------------------------------------
             // Do it..
             //-----------------------------------------
             require_once IPS_ROOT_PATH . 'applications/core/modules_admin/tools/help.php';
             $help = new admin_core_tools_help();
             $help->makeRegistryShortcuts($this->registry);
             $overwrite = IPSSetUp::getSavedData('helpfile') ? TRUE : FALSE;
             $done = $help->helpFilesXMLImport_app($next['key'], $overwrite);
             $output[] = $next['key'] . ": Added " . $done['added'] . ", " . $done['updated'] . " updated help files";
         }
         //-----------------------------------------
         // Done.. so get some more!
         //-----------------------------------------
         $this->_finishStep($output, "Upgrade: Help System", 'upgrade&do=acphelp&previous=' . $next['key']);
     } else {
         //-----------------------------------------
         // Next...
         //-----------------------------------------
         $output[] = "All help files upgraded";
         $this->_finishStep($output, "Upgrade: Help System", 'upgrade&do=other');
     }
 }