/** * Setup the instance (singleton) * * @return ACP */ public static function getInstance() { if (!self::$_instance instanceof self) { self::$_instance = new self(); } return self::$_instance; }
$GLOBALS['smarty']->error_reporting = E_ALL & ~E_NOTICE & ~E_WARNING; $GLOBALS['smarty']->compile_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->config_dir = CC_SKIN_CACHE_DIR; $GLOBALS['smarty']->cache_dir = CC_SKIN_CACHE_DIR; //Initialize language $GLOBALS['language'] = Language::getInstance(); //Initialize hooks $GLOBALS['hooks'] = HookLoader::getInstance(); //Initialize GUI $GLOBALS['gui'] = GUI::getInstance(true); //Initialize SSL $GLOBALS['ssl'] = SSL::getInstance(); //Initialize SEO $GLOBALS['seo'] = SEO::getInstance(); //Setup language template $GLOBALS['language']->setTemplate(); //Initialize Catalogue $GLOBALS['catalogue'] = Catalogue::getInstance(); // Define the default timezone $tz = $GLOBALS['config']->get('config', 'time_zone'); date_default_timezone_set(!empty($tz) ? $tz : 'UTC'); $GLOBALS['main'] = ACP::getInstance(); $lang = $GLOBALS['language']->getLanguageStrings(); $global_template_file['session_true'] = 'main.php'; $global_template_file['session_false'] = 'login.php'; // hook_tab_content is a place where hooks can specify template includes that // define their admin tab content. $GLOBALS['hook_tab_content'] = array(); foreach ($GLOBALS['hooks']->load('controller.admin') as $hook) { include $hook; }
function run_admin_command_palette() { global $ACP; $ACP = new ACP(); $ACP->run(); }