$var ) { if ( !array_key_exists( $key, $GLOBALS ) ) { $GLOBALS[$key] = $var; } } if ( defined( 'MW_CONFIG_CALLBACK' ) ) { # Use a callback function to configure MediaWiki MWFunction::call( MW_CONFIG_CALLBACK ); } else { // Require the configuration (probably LocalSettings.php) require loadSettings(); } // Some last includes require_once MWInit::compiledPath( 'includes/Setup.php' ); // Much much faster startup than creating a title object $wgTitle = null; global $wgAutoloadClasses; if ( is_null( $wgAutoloadClasses ) ) { $wgAutoloadClasses = array(); } require_once $IP . '/tests/TestsAutoLoader.php'; function loadSettings() { global $wgCommandLineMode, $IP; $settingsFile = "$IP/LocalSettings.php"; if ( !is_readable( $settingsFile ) ) { $this->error( "A copy of your installation's LocalSettings.php\n" . "must exist and be readable in the source directory.\n" . "Use --conf to specify it.", true ); } $wgCommandLineMode = true; return $settingsFile; }