public static function loadEngineTasks() { CodonRewrite::ProcessRewrite(); Vars::setParameters(); self::$activeModule = strtoupper(CodonRewrite::$current_module); Config::loadSettings(); self::loadModules(); }
/** * Initialize, or re-initialize, GNU social global configuration * and plugins. * * If switching site configurations during script execution, be * careful when working with leftover objects -- global settings * affect many things and they may not behave as you expected. * * @param $server optional web server hostname for picking config * @param $path optional URL path for picking config * @param $conffile optional configuration file path * * @throws NoConfigException if config file can't be found */ public static function init($server = null, $path = null, $conffile = null) { Router::clear(); self::initDefaults($server, $path); self::loadConfigFile($conffile); $sprofile = common_config('site', 'profile'); if (!empty($sprofile)) { self::loadSiteProfile($sprofile); } // Load settings from database; note we need autoload for this Config::loadSettings(); self::initPlugins(); }
/** * handle the action * * Check session token and try to save the settings if this is a * POST. Otherwise, show the form. * * @param array $args unused. * * @return void */ function handle($args) { if ($_SERVER['REQUEST_METHOD'] == 'POST') { $this->checkSessionToken(); try { $this->saveSettings(); // Reload settings Config::loadSettings(); $this->success = true; // TRANS: Message after successful saving of administrative settings. $this->msg = _('Settings saved.'); } catch (Exception $e) { $this->success = false; $this->msg = $e->getMessage(); } } $this->showPage(); }
/** * Initialize, or re-initialize, StatusNet global configuration * and plugins. * * If switching site configurations during script execution, be * careful when working with leftover objects -- global settings * affect many things and they may not behave as you expected. * * @param $server optional web server hostname for picking config * @param $path optional URL path for picking config * @param $conffile optional configuration file path * * @throws NoConfigException if config file can't be found */ public static function init($server = null, $path = null, $conffile = null) { StatusNet::initDefaults($server, $path); StatusNet::loadConfigFile($conffile); // Load settings from database; note we need autoload for this Config::loadSettings(); self::initPlugins(); }
exit(100); } if ($err->getCode()) { throw new PEAR_Exception($msg, $err, $err->getCode()); } else { throw new PEAR_Exception($msg, $err); } } PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'PEAR_ErrorToPEAR_Exception'); function testDb() { $dbTester = new DBTester(); try { $dbTester->test(); } catch (Exception $e) { throw new FluidframeException('Invalid Database setup: ' . $e->getMessage()); } } class DBTester { function test() { $config = new Config(); $config->limit(1); $config->find(true); $config->free(); } } // testDb(); // It breaks first checkschema! Config::loadSettings();