MediaWiki  REL1_23
Setup.php
Go to the documentation of this file.
00001 <?php
00031 if ( !defined( 'MEDIAWIKI' ) ) {
00032     exit( 1 );
00033 }
00034 
00035 $fname = 'Setup.php';
00036 wfProfileIn( $fname );
00037 wfProfileIn( $fname . '-defaults' );
00038 
00039 // Check to see if we are at the file scope
00040 if ( !isset( $wgVersion ) ) {
00041     echo "Error, Setup.php must be included from the file scope, after DefaultSettings.php\n";
00042     die( 1 );
00043 }
00044 
00045 // Set various default paths sensibly...
00046 if ( $wgScript === false ) {
00047     $wgScript = "$wgScriptPath/index$wgScriptExtension";
00048 }
00049 if ( $wgLoadScript === false ) {
00050     $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
00051 }
00052 
00053 if ( $wgArticlePath === false ) {
00054     if ( $wgUsePathInfo ) {
00055         $wgArticlePath = "$wgScript/$1";
00056     } else {
00057         $wgArticlePath = "$wgScript?title=$1";
00058     }
00059 }
00060 
00061 if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
00062     // 'view' is assumed the default action path everywhere in the code
00063     // but is rarely filled in $wgActionPaths
00064     $wgActionPaths['view'] = $wgArticlePath;
00065 }
00066 
00067 if ( $wgStylePath === false ) {
00068     $wgStylePath = "$wgScriptPath/skins";
00069 }
00070 if ( $wgLocalStylePath === false ) {
00071     $wgLocalStylePath = "$wgScriptPath/skins";
00072 }
00073 if ( $wgStyleDirectory === false ) {
00074     $wgStyleDirectory = "$IP/skins";
00075 }
00076 if ( $wgExtensionAssetsPath === false ) {
00077     $wgExtensionAssetsPath = "$wgScriptPath/extensions";
00078 }
00079 
00080 if ( $wgLogo === false ) {
00081     $wgLogo = "$wgStylePath/common/images/wiki.png";
00082 }
00083 
00084 if ( $wgUploadPath === false ) {
00085     $wgUploadPath = "$wgScriptPath/images";
00086 }
00087 if ( $wgUploadDirectory === false ) {
00088     $wgUploadDirectory = "$IP/images";
00089 }
00090 if ( $wgReadOnlyFile === false ) {
00091     $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
00092 }
00093 if ( $wgFileCacheDirectory === false ) {
00094     $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
00095 }
00096 if ( $wgDeletedDirectory === false ) {
00097     $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
00098 }
00099 
00100 if ( isset( $wgFileStore['deleted']['directory'] ) ) {
00101     $wgDeletedDirectory = $wgFileStore['deleted']['directory'];
00102 }
00103 
00104 if ( isset( $wgFooterIcons['copyright'] )
00105     && isset( $wgFooterIcons['copyright']['copyright'] )
00106     && $wgFooterIcons['copyright']['copyright'] === array()
00107 ) {
00108     if ( isset( $wgCopyrightIcon ) && $wgCopyrightIcon ) {
00109         $wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
00110     } elseif ( $wgRightsIcon || $wgRightsText ) {
00111         $wgFooterIcons['copyright']['copyright'] = array(
00112             'url' => $wgRightsUrl,
00113             'src' => $wgRightsIcon,
00114             'alt' => $wgRightsText,
00115         );
00116     } else {
00117         unset( $wgFooterIcons['copyright']['copyright'] );
00118     }
00119 }
00120 
00121 if ( isset( $wgFooterIcons['poweredby'] )
00122     && isset( $wgFooterIcons['poweredby']['mediawiki'] )
00123     && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
00124 ) {
00125     $wgFooterIcons['poweredby']['mediawiki']['src'] = "$wgStylePath/common/images/poweredby_mediawiki_88x31.png";
00126 }
00127 
00135 $wgNamespaceProtection[NS_MEDIAWIKI] = 'editinterface';
00136 
00142 $wgNamespaceAliases['Image'] = NS_FILE;
00143 $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK;
00144 
00148 $wgLockManagers[] = array(
00149     'name' => 'fsLockManager',
00150     'class' => 'FSLockManager',
00151     'lockDirectory' => "{$wgUploadDirectory}/lockdir",
00152 );
00153 $wgLockManagers[] = array(
00154     'name' => 'nullLockManager',
00155     'class' => 'NullLockManager',
00156 );
00157 
00161 if ( !$wgLocalFileRepo ) {
00162     if ( isset( $wgFileStore['deleted']['hash'] ) ) {
00163         $deletedHashLevel = $wgFileStore['deleted']['hash'];
00164     } else {
00165         $deletedHashLevel = $wgHashedUploadDirectory ? 3 : 0;
00166     }
00167     $wgLocalFileRepo = array(
00168         'class' => 'LocalRepo',
00169         'name' => 'local',
00170         'directory' => $wgUploadDirectory,
00171         'scriptDirUrl' => $wgScriptPath,
00172         'scriptExtension' => $wgScriptExtension,
00173         'url' => $wgUploadBaseUrl ? $wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
00174         'hashLevels' => $wgHashedUploadDirectory ? 2 : 0,
00175         'thumbScriptUrl' => $wgThumbnailScriptPath,
00176         'transformVia404' => !$wgGenerateThumbnailOnParse,
00177         'deletedDir' => $wgDeletedDirectory,
00178         'deletedHashLevels' => $deletedHashLevel
00179     );
00180 }
00184 if ( $wgUseSharedUploads ) {
00185     if ( $wgSharedUploadDBname ) {
00186         $wgForeignFileRepos[] = array(
00187             'class' => 'ForeignDBRepo',
00188             'name' => 'shared',
00189             'directory' => $wgSharedUploadDirectory,
00190             'url' => $wgSharedUploadPath,
00191             'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
00192             'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
00193             'transformVia404' => !$wgGenerateThumbnailOnParse,
00194             'dbType' => $wgDBtype,
00195             'dbServer' => $wgDBserver,
00196             'dbUser' => $wgDBuser,
00197             'dbPassword' => $wgDBpassword,
00198             'dbName' => $wgSharedUploadDBname,
00199             'dbFlags' => ( $wgDebugDumpSql ? DBO_DEBUG : 0 ) | DBO_DEFAULT,
00200             'tablePrefix' => $wgSharedUploadDBprefix,
00201             'hasSharedCache' => $wgCacheSharedUploads,
00202             'descBaseUrl' => $wgRepositoryBaseUrl,
00203             'fetchDescription' => $wgFetchCommonsDescriptions,
00204         );
00205     } else {
00206         $wgForeignFileRepos[] = array(
00207             'class' => 'FileRepo',
00208             'name' => 'shared',
00209             'directory' => $wgSharedUploadDirectory,
00210             'url' => $wgSharedUploadPath,
00211             'hashLevels' => $wgHashedSharedUploadDirectory ? 2 : 0,
00212             'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
00213             'transformVia404' => !$wgGenerateThumbnailOnParse,
00214             'descBaseUrl' => $wgRepositoryBaseUrl,
00215             'fetchDescription' => $wgFetchCommonsDescriptions,
00216         );
00217     }
00218 }
00219 if ( $wgUseInstantCommons ) {
00220     $wgForeignFileRepos[] = array(
00221         'class' => 'ForeignAPIRepo',
00222         'name' => 'wikimediacommons',
00223         'apibase' => WebRequest::detectProtocol() === 'https' ?
00224             'https://commons.wikimedia.org/w/api.php' :
00225             'http://commons.wikimedia.org/w/api.php',
00226         'hashLevels' => 2,
00227         'fetchDescription' => true,
00228         'descriptionCacheExpiry' => 43200,
00229         'apiThumbCacheExpiry' => 86400,
00230     );
00231 }
00232 /*
00233  * Add on default file backend config for file repos.
00234  * FileBackendGroup will handle initializing the backends.
00235  */
00236 if ( !isset( $wgLocalFileRepo['backend'] ) ) {
00237     $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
00238 }
00239 foreach ( $wgForeignFileRepos as &$repo ) {
00240     if ( !isset( $repo['directory'] ) && $repo['class'] === 'ForeignAPIRepo' ) {
00241         $repo['directory'] = $wgUploadDirectory; // b/c
00242     }
00243     if ( !isset( $repo['backend'] ) ) {
00244         $repo['backend'] = $repo['name'] . '-backend';
00245     }
00246 }
00247 unset( $repo ); // no global pollution; destroy reference
00248 
00249 if ( $wgRCFilterByAge ) {
00250     // Trim down $wgRCLinkDays so that it only lists links which are valid
00251     // as determined by $wgRCMaxAge.
00252     // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link.
00253     sort( $wgRCLinkDays );
00254     for ( $i = 0; $i < count( $wgRCLinkDays ); $i++ ) {
00255         if ( $wgRCLinkDays[$i] >= $wgRCMaxAge / ( 3600 * 24 ) ) {
00256             $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i + 1, false );
00257             break;
00258         }
00259     }
00260 }
00261 
00262 if ( $wgSkipSkin ) {
00263     $wgSkipSkins[] = $wgSkipSkin;
00264 }
00265 
00266 if ( $wgLocalInterwiki ) {
00267     array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
00268 }
00269 
00270 // Set default shared prefix
00271 if ( $wgSharedPrefix === false ) {
00272     $wgSharedPrefix = $wgDBprefix;
00273 }
00274 
00275 if ( !$wgCookiePrefix ) {
00276     if ( $wgSharedDB && $wgSharedPrefix && in_array( 'user', $wgSharedTables ) ) {
00277         $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
00278     } elseif ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) {
00279         $wgCookiePrefix = $wgSharedDB;
00280     } elseif ( $wgDBprefix ) {
00281         $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
00282     } else {
00283         $wgCookiePrefix = $wgDBname;
00284     }
00285 }
00286 $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' );
00287 
00288 $wgUseEnotif = $wgEnotifUserTalk || $wgEnotifWatchlist;
00289 
00290 if ( $wgMetaNamespace === false ) {
00291     $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
00292 }
00293 
00294 // Default value is either the suhosin limit or -1 for unlimited
00295 if ( $wgResourceLoaderMaxQueryLength === false ) {
00296     $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
00297     $wgResourceLoaderMaxQueryLength = $maxValueLength > 0 ? $maxValueLength : -1;
00298 }
00299 
00304 $wgCanonicalNamespaceNames = array(
00305     NS_MEDIA            => 'Media',
00306     NS_SPECIAL          => 'Special',
00307     NS_TALK             => 'Talk',
00308     NS_USER             => 'User',
00309     NS_USER_TALK        => 'User_talk',
00310     NS_PROJECT          => 'Project',
00311     NS_PROJECT_TALK     => 'Project_talk',
00312     NS_FILE             => 'File',
00313     NS_FILE_TALK        => 'File_talk',
00314     NS_MEDIAWIKI        => 'MediaWiki',
00315     NS_MEDIAWIKI_TALK   => 'MediaWiki_talk',
00316     NS_TEMPLATE         => 'Template',
00317     NS_TEMPLATE_TALK    => 'Template_talk',
00318     NS_HELP             => 'Help',
00319     NS_HELP_TALK        => 'Help_talk',
00320     NS_CATEGORY         => 'Category',
00321     NS_CATEGORY_TALK    => 'Category_talk',
00322 );
00323 
00325 if ( is_array( $wgExtraNamespaces ) ) {
00326     $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames + $wgExtraNamespaces;
00327 }
00328 
00329 // These are now the same, always
00330 // To determine the user language, use $wgLang->getCode()
00331 $wgContLanguageCode = $wgLanguageCode;
00332 
00333 // Easy to forget to falsify $wgShowIPinHeader for static caches.
00334 // If file cache or squid cache is on, just disable this (DWIMD).
00335 // Do the same for $wgDebugToolbar.
00336 if ( $wgUseFileCache || $wgUseSquid ) {
00337     $wgShowIPinHeader = false;
00338     $wgDebugToolbar = false;
00339 }
00340 
00341 // Doesn't make sense to have if disabled.
00342 if ( !$wgEnotifMinorEdits ) {
00343     $wgHiddenPrefs[] = 'enotifminoredits';
00344 }
00345 
00346 // We always output HTML5 since 1.22, overriding these is no longer supported
00347 // we set them here for extensions that depend on its value.
00348 $wgHtml5 = true;
00349 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
00350 $wgJsMimeType = 'text/javascript';
00351 
00352 if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) {
00353     // see http://www.w3.org/TR/rdfa-in-html/#document-conformance
00354     if ( $wgMimeType == 'application/xhtml+xml' ) {
00355         $wgHtml5Version = 'XHTML+RDFa 1.0';
00356     } else {
00357         $wgHtml5Version = 'HTML+RDFa 1.0';
00358     }
00359 }
00360 
00361 // Blacklisted file extensions shouldn't appear on the "allowed" list
00362 $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
00363 
00364 if ( $wgArticleCountMethod === null ) {
00365     $wgArticleCountMethod = $wgUseCommaCount ? 'comma' : 'link';
00366 }
00367 
00368 if ( $wgInvalidateCacheOnLocalSettingsChange ) {
00369     $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( "$IP/LocalSettings.php" ) ) );
00370 }
00371 
00372 if ( $wgNewUserLog ) {
00373     // Add a new log type
00374     $wgLogTypes[] = 'newusers';
00375     $wgLogNames['newusers'] = 'newuserlogpage';
00376     $wgLogHeaders['newusers'] = 'newuserlogpagetext';
00377     $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter';
00378     $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter';
00379     $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter';
00380     $wgLogActionsHandlers['newusers/byemail'] = 'NewUsersLogFormatter';
00381     $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter';
00382 }
00383 
00384 if ( $wgCookieSecure === 'detect' ) {
00385     $wgCookieSecure = ( WebRequest::detectProtocol() === 'https' );
00386 }
00387 
00388 if ( $wgRC2UDPAddress ) {
00389     $wgRCFeeds['default'] = array(
00390         'formatter' => 'IRCColourfulRCFeedFormatter',
00391         'uri' => "udp://$wgRC2UDPAddress:$wgRC2UDPPort/$wgRC2UDPPrefix",
00392         'add_interwiki_prefix' => &$wgRC2UDPInterwikiPrefix,
00393         'omit_bots' => &$wgRC2UDPOmitBots,
00394     );
00395 }
00396 
00397 wfProfileOut( $fname . '-defaults' );
00398 
00399 // Disable MWDebug for command line mode, this prevents MWDebug from eating up
00400 // all the memory from logging SQL queries on maintenance scripts
00401 global $wgCommandLineMode;
00402 if ( $wgDebugToolbar && !$wgCommandLineMode ) {
00403     wfProfileIn( $fname . '-debugtoolbar' );
00404     MWDebug::init();
00405     wfProfileOut( $fname . '-debugtoolbar' );
00406 }
00407 
00408 if ( !class_exists( 'AutoLoader' ) ) {
00409     require_once "$IP/includes/AutoLoader.php";
00410 }
00411 
00412 wfProfileIn( $fname . '-exception' );
00413 MWExceptionHandler::installHandler();
00414 wfProfileOut( $fname . '-exception' );
00415 
00416 wfProfileIn( $fname . '-includes' );
00417 require_once "$IP/includes/normal/UtfNormalUtil.php";
00418 require_once "$IP/includes/GlobalFunctions.php";
00419 require_once "$IP/includes/normal/UtfNormalDefines.php";
00420 wfProfileOut( $fname . '-includes' );
00421 
00422 wfProfileIn( $fname . '-defaults2' );
00423 if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
00424     $wgSecureLogin = false;
00425     wfWarn( 'Secure login was enabled on a server that only supports HTTP or HTTPS. Disabling secure login.' );
00426 }
00427 
00428 // Now that GlobalFunctions is loaded, set defaults that depend
00429 // on it.
00430 if ( $wgTmpDirectory === false ) {
00431     wfProfileIn( $fname . '-tempDir' );
00432     $wgTmpDirectory = wfTempDir();
00433     wfProfileOut( $fname . '-tempDir' );
00434 }
00435 
00436 if ( $wgCanonicalServer === false ) {
00437     $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP );
00438 }
00439 
00440 // $wgHTCPMulticastRouting got renamed to $wgHTCPRouting in MediaWiki 1.22
00441 // ensure back compatibility.
00442 if ( !$wgHTCPRouting && $wgHTCPMulticastRouting ) {
00443     $wgHTCPRouting = $wgHTCPMulticastRouting;
00444 }
00445 
00446 // Initialize $wgHTCPRouting from backwards-compatible settings that
00447 // comes from pre 1.20 version.
00448 if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) {
00449     $wgHTCPRouting = array(
00450         '' => array(
00451             'host' => $wgHTCPMulticastAddress,
00452             'port' => $wgHTCPPort,
00453         )
00454     );
00455 }
00456 
00457 // Back compatibility for $wgRateLimitLog deprecated with 1.23
00458 if ( $wgRateLimitLog && ! array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
00459     $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
00460 }
00461 
00462 if ( $wgProfileOnly ) {
00463     $wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
00464     $wgDebugLogFile = '';
00465 }
00466 
00467 wfProfileOut( $fname . '-defaults2' );
00468 wfProfileIn( $fname . '-misc1' );
00469 
00470 // Raise the memory limit if it's too low
00471 wfMemoryLimit();
00472 
00478 if ( is_null( $wgLocaltimezone ) ) {
00479     wfSuppressWarnings();
00480     $wgLocaltimezone = date_default_timezone_get();
00481     wfRestoreWarnings();
00482 }
00483 
00484 date_default_timezone_set( $wgLocaltimezone );
00485 if ( is_null( $wgLocalTZoffset ) ) {
00486     $wgLocalTZoffset = date( 'Z' ) / 60;
00487 }
00488 
00489 // Useful debug output
00490 if ( $wgCommandLineMode ) {
00491     $wgRequest = new FauxRequest( array() );
00492 
00493     wfDebug( "\n\nStart command line script $self\n" );
00494 } else {
00495     // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
00496     $wgRequest = new WebRequest;
00497 
00498     $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
00499 
00500     if ( $wgDebugPrintHttpHeaders ) {
00501         $debug .= "HTTP HEADERS:\n";
00502 
00503         foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
00504             $debug .= "$name: $value\n";
00505         }
00506     }
00507     wfDebug( $debug );
00508 }
00509 
00510 wfProfileOut( $fname . '-misc1' );
00511 wfProfileIn( $fname . '-memcached' );
00512 
00513 $wgMemc = wfGetMainCache();
00514 $messageMemc = wfGetMessageCacheStorage();
00515 $parserMemc = wfGetParserCacheStorage();
00516 $wgLangConvMemc = wfGetLangConverterCacheStorage();
00517 
00518 wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
00519     ', message: ' . get_class( $messageMemc ) .
00520     ', parser: ' . get_class( $parserMemc ) );
00521 
00522 wfProfileOut( $fname . '-memcached' );
00523 
00524 // Most of the config is out, some might want to run hooks here.
00525 wfRunHooks( 'SetupAfterCache' );
00526 
00527 wfProfileIn( $fname . '-session' );
00528 
00529 // If session.auto_start is there, we can't touch session name
00530 if ( !wfIniGetBool( 'session.auto_start' ) ) {
00531     session_name( $wgSessionName ? $wgSessionName : $wgCookiePrefix . '_session' );
00532 }
00533 
00534 if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
00535     if ( $wgRequest->checkSessionCookie() || isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
00536         wfSetupSession();
00537         $wgSessionStarted = true;
00538     } else {
00539         $wgSessionStarted = false;
00540     }
00541 }
00542 
00543 wfProfileOut( $fname . '-session' );
00544 wfProfileIn( $fname . '-globals' );
00545 
00546 $wgContLang = Language::factory( $wgLanguageCode );
00547 $wgContLang->initEncoding();
00548 $wgContLang->initContLang();
00549 
00550 // Now that variant lists may be available...
00551 $wgRequest->interpolateTitle();
00552 $wgUser = RequestContext::getMain()->getUser(); // BackCompat
00553 
00557 $wgLang = new StubUserLang;
00558 
00562 $wgOut = RequestContext::getMain()->getOutput(); // BackCompat
00563 
00567 $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
00568 
00569 if ( !is_object( $wgAuth ) ) {
00570     $wgAuth = new AuthPlugin;
00571     wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) );
00572 }
00573 
00574 # Placeholders in case of DB error
00575 $wgTitle = null;
00576 
00577 $wgDeferredUpdateList = array();
00578 
00579 wfProfileOut( $fname . '-globals' );
00580 wfProfileIn( $fname . '-extensions' );
00581 
00582 // Extension setup functions for extensions other than skins
00583 // Entries should be added to this variable during the inclusion
00584 // of the extension file. This allows the extension to perform
00585 // any necessary initialisation in the fully initialised environment
00586 foreach ( $wgExtensionFunctions as $func ) {
00587     // Allow closures in PHP 5.3+
00588     if ( is_object( $func ) && $func instanceof Closure ) {
00589         $profName = $fname . '-extensions-closure';
00590     } elseif ( is_array( $func ) ) {
00591         if ( is_object( $func[0] ) ) {
00592             $profName = $fname . '-extensions-' . get_class( $func[0] ) . '::' . $func[1];
00593         } else {
00594             $profName = $fname . '-extensions-' . implode( '::', $func );
00595         }
00596     } else {
00597         $profName = $fname . '-extensions-' . strval( $func );
00598     }
00599 
00600     wfProfileIn( $profName );
00601     call_user_func( $func );
00602     wfProfileOut( $profName );
00603 }
00604 
00605 wfDebug( "Fully initialised\n" );
00606 $wgFullyInitialised = true;
00607 
00608 wfProfileOut( $fname . '-extensions' );
00609 wfProfileOut( $fname );