public function action() { set_time_limit(0); Cache::clear(); ModuleManager::create_common_cache(); Base_ThemeCommon::themeup(); return true; }
public function action() { $success = true; ini_set('display_errors', true); set_time_limit(0); switch ($this->get_step()) { case 1: $this->_patches_ran = PatchUtil::apply_new(); $this->set_next_step(2); break; case 2: ModuleManager::create_common_cache(); Base_ThemeCommon::themeup(); Base_LangCommon::update_translations(); Cache::clear(); break; } return $success; }
<?php define('CID', false); require_once '../../../include.php'; ModuleManager::load_modules(); if (!Acl::i_am_admin()) { die("Access forbidden"); } function ret($val) { print $val; exit; } try { $patches = PatchUtil::apply_new(); } catch (ErrorException $e) { ret($e->getMessage()); } ModuleManager::create_common_cache(); Base_ThemeCommon::themeup(); Base_LangCommon::update_translations(); foreach ($patches as $patch) { if ($patch->get_apply_status() !== Patch::STATUS_SUCCESS) { ret(0); } } ret(1);