/** * Install Modules * * @return void */ public function install_modules() { //----------------------------------------- // INIT //----------------------------------------- $previous = $_REQUEST['previous']; //----------------------------------------- // Fetch next 'un //----------------------------------------- $next = IPSSetUp::fetchNextApplication($previous, '{app}_modules.xml', $this->settings['gb_char_set']); //----------------------------------------- // Install SYSTEM Templates //----------------------------------------- if ($next['key']) { $output[] = $next['title'] . ": Обновление модулей"; $_PATH = IPSLib::getAppDir($next['key']) . '/xml/'; if (is_file($_PATH . $next['key'] . '_modules.xml')) { require_once IPS_ROOT_PATH . 'applications/core/modules_admin/applications/applications.php'; /*noLibHook*/ $apps = new admin_core_applications_applications(); $apps->makeRegistryShortcuts($this->registry); $this->request['_app'] = $next['key']; $apps->moduleImport('', 1, FALSE); } //----------------------------------------- // Done.. so get some more! //----------------------------------------- $this->_finishStep($output, "Обновление: Модули", 'upgrade&do=modules&previous=' . $next['key']); } else { //----------------------------------------- // Next... //----------------------------------------- $output[] = "Все модули обновлены"; $this->_finishStep($output, "Обновление: Модули", 'upgrade&do=settings'); } }
/** * Install Modules * * @return void */ public function install_modules() { //----------------------------------------- // INIT //----------------------------------------- $previous = $_REQUEST['previous']; //----------------------------------------- // Fetch next 'un //----------------------------------------- $next = IPSSetUp::fetchNextApplication($previous, '{app}_modules.xml'); //----------------------------------------- // Install SYSTEM Templates //----------------------------------------- if ($next['key']) { $output[] = $next['title'] . ": Upgrading modules..."; $_PATH = IPSLib::getAppDir($next['key']) . '/xml/'; if (file_exists($_PATH . $next['key'] . '_modules.xml')) { require_once IPS_ROOT_PATH . 'applications/core/modules_admin/applications/applications.php'; $apps = new admin_core_applications_applications(); $apps->makeRegistryShortcuts($this->registry); $this->request['_app'] = $next['key']; $apps->moduleImport('', 1, FALSE); } //----------------------------------------- // Done.. so get some more! //----------------------------------------- $this->_finishStep($output, "Upgrade: Modules", 'upgrade&do=modules&previous=' . $next['key']); } else { //----------------------------------------- // Next... //----------------------------------------- $output[] = "All modules upgraded"; $this->_finishStep($output, "Upgrade: Modules", 'upgrade&do=settings'); } }