/** * Initalize the settings stored in a serialized file. * This have to be done before the end of LocalSettings.php but is in a function * because administrators might configure some settings between the moment where * the file is loaded and the execution of these function. * Settings are not filled only if they doesn't exists because of a security * hole if the register_globals feature of PHP is enabled. * * @param $wiki String */ function efConfigureSetup($wiki = 'default') { global $wgConf, $wgConfigureFilesPath, $wgConfigureExtDir, $wgConfigureHandler, $wgConfigureAllowDeferSetup; wfProfileIn(__FUNCTION__); # Create the new configuration object... $oldConf = $wgConf; require_once dirname(__FILE__) . '/Configure.obj.php'; $wgConf = new WebConfiguration($wiki, $wgConfigureFilesPath); # Copy the existing settings... $wgConf->suffixes = $oldConf->suffixes; $wgConf->wikis = $oldConf->wikis; $wgConf->settings = $oldConf->settings; $wgConf->localVHosts = $oldConf->localVHosts; $wgConf->siteParamsCallback = $oldConf->siteParamsCallback; $wgConf->snapshotDefaults(); if ($wgConfigureAllowDeferSetup && $wgConfigureHandler == 'db') { // Defer to after caches and database are set up. global $wgExtensionFunctions; $wgExtensionFunctions[] = 'efConfigureInitialise'; } else { efConfigureInitialise(); } # Cleanup $wgConfigureExtDir as needed if (substr($wgConfigureExtDir, -1) != '/' && substr($wgConfigureExtDir, -1) != '\\') { $wgConfigureExtDir .= '/'; } wfProfileOut(__FUNCTION__); }