/** * Very rough integration test of the updater * Passes if no errors are thrown * Also defines $page for subsequent tests * */ function UpdateOutputTest() { global $page; ob_start(); includeFile('tool/update.php'); $page = new update_class(); gpOutput::HeadContent(); includeFile('install/template.php'); ob_get_clean(); }
/** * Send all content according to the current layout * @static */ function Template() { global $page, $GP_ARRANGE, $GP_STYLES, $get_all_gadgets_called, $addon_current_id; $get_all_gadgets_called = false; if (isset($page->theme_addon_id)) { $addon_current_id = $page->theme_addon_id; } gpOutput::TemplateSettings(); header('Content-Type: text/html; charset=utf-8'); require $page->theme_dir . '/template.php'; gpPlugin::ClearDataFolder(); gpOutput::AllGadgetSetting(); gpOutput::HeadContent(); }
/** * Send all content according to the current layout * @static * */ static function Template() { global $page, $GP_ARRANGE, $GP_STYLES, $get_all_gadgets_called, $addon_current_id, $GP_MENU_LINKS, $GP_MENU_CLASS, $GP_MENU_CLASSES, $GP_MENU_ELEMENTS; $get_all_gadgets_called = false; if (isset($page->theme_addon_id)) { $addon_current_id = $page->theme_addon_id; } gpOutput::TemplateSettings(); self::StandardHeaders(); $path = $page->theme_dir . '/template.php'; $return = IncludeScript($path, 'require', array('page', 'GP_ARRANGE', 'GP_MENU_LINKS', 'GP_MENU_CLASS', 'GP_MENU_CLASSES', 'GP_MENU_ELEMENTS')); //return will be false if there's a fatal error with the template.php file if ($return === false) { gpOutput::BodyAsHtml(); } gpPlugin::ClearDataFolder(); gpOutput::HeadContent(); }
<?php define('is_running', true); //define('gpdebug',true); require_once '../common.php'; common::EntryPoint(2, 'update.php'); /* check permissions */ if (!common::LoggedIn()) { die('You must be logged in to access this area.'); } if (!isset($gpAdmin['granted']) || $gpAdmin['granted'] !== 'all') { die('Sorry, you do not have sufficient privileges to access this area.'); } includeFile('tool/update.php'); common::GetLangFile(); $page = new update_class(); gpOutput::HeadContent(); includeFile('install/template.php');