/** * Load messages and initialise static variables */ protected static function loadSettingsDefs() { if (self::$initialized) { return; } self::$initialized = true; require dirname(__FILE__) . '/Configure.settings.php'; self::$settings = $settings; self::$restricted = $restricted; self::$arrayDefs = $arrayDefs; self::$notEditableSettings = $notEditableSettings; self::$settingsVersion = $settingsVersion; }
if (isset($options['help'])) { printHelp(); } // Get our settings defs if (isset($options['from-doc'])) { $cont = Http::get('http://www.mediawiki.org/w/index.php?title=Manual:Configuration_settings&action=raw'); $m = array(); preg_match_all('/\\[\\[[Mm]anual:\\$(wg[A-Za-z0-9]+)\\|/', $cont, $m); $allSettings = array_unique($m[1]); } else { $allSettings = array_keys(SpecialConfigure::getAllSettings()); } // Now we'll need to open DefaultSettings.php $m = array(); $defaultSettings = file_get_contents("{$IP}/includes/DefaultSettings.php"); preg_match_all('/\\$(wg[A-Za-z0-9]+)\\s*\\=/', $defaultSettings, $m); $definedSettings = array_unique($m[1]); $missing = array_diff($definedSettings, $allSettings); $remain = array_diff($allSettings, $definedSettings); $obsolete = array(); foreach ($remain as $setting) { if (SpecialConfigure::isSettingAvailable($setting)) { $obsolete[] = $setting; } } // let's show the results: printArray('missing', $missing); printArray('obsolete', $obsolete); if (count($missing) == 0 && count($obsolete) == 0) { echo "Looks good!\n"; }