7a89c7a3202b3d177680a70de8150904b4789f96
3 * Include most things that are needed to make %MediaWiki work.
5 * This file is included by WebStart.php and doMaintenance.php so that both
6 * web and maintenance scripts share a final set up phase to include necessary
7 * files and create global object variables.
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License along
20 * with this program; if not, write to the Free Software Foundation, Inc.,
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22 * http://www.gnu.org/copyleft/gpl.html
28 * This file is not a valid entry point, perform no further processing unless
29 * MEDIAWIKI is defined
31 if ( !defined( 'MEDIAWIKI' ) ) {
36 wfProfileIn( $fname );
37 wfProfileIn( $fname . '-defaults' );
39 // Check to see if we are at the file scope
40 if ( !isset( $wgVersion ) ) {
41 echo "Error, Setup.php must be included from the file scope, after DefaultSettings.php\n";
45 // Set various default paths sensibly...
47 if ( $wgScript === false ) {
48 $wgScript = "$wgScriptPath/index$wgScriptExtension";
50 if ( $wgLoadScript === false ) {
51 $wgLoadScript = "$wgScriptPath/load$wgScriptExtension";
54 if ( $wgArticlePath === false ) {
55 if ( $wgUsePathInfo ) {
56 $wgArticlePath = "$wgScript/$1";
58 $wgArticlePath = "$wgScript?title=$1";
62 if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) {
63 // 'view' is assumed the default action path everywhere in the code
64 // but is rarely filled in $wgActionPaths
65 $wgActionPaths['view'] = $wgArticlePath;
68 if ( $wgStylePath === false ) {
69 $wgStylePath = "$wgScriptPath/skins";
71 if ( $wgLocalStylePath === false ) {
72 $wgLocalStylePath = "$wgScriptPath/skins";
74 if ( $wgStyleDirectory === false ) {
75 $wgStyleDirectory = "$IP/skins";
77 if ( $wgExtensionAssetsPath === false ) {
78 $wgExtensionAssetsPath = "$wgScriptPath/extensions";
80 if ( $wgResourceBasePath === null ) {
81 $wgResourceBasePath = $wgScriptPath;
84 if ( $wgLogo === false ) {
85 $wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
88 if ( $wgUploadPath === false ) {
89 $wgUploadPath = "$wgScriptPath/images";
91 if ( $wgUploadDirectory === false ) {
92 $wgUploadDirectory = "$IP/images";
94 if ( $wgReadOnlyFile === false ) {
95 $wgReadOnlyFile = "{$wgUploadDirectory}/lock_yBgMBwiR";
97 if ( $wgFileCacheDirectory === false ) {
98 $wgFileCacheDirectory = "{$wgUploadDirectory}/cache";
100 if ( $wgDeletedDirectory === false ) {
101 $wgDeletedDirectory = "{$wgUploadDirectory}/deleted";
104 if ( $wgGitInfoCacheDirectory === false && $wgCacheDirectory !== false ) {
105 $wgGitInfoCacheDirectory = "{$wgCacheDirectory}/gitinfo";
108 // Fix path to icon images after they were moved in 1.24
109 if ( $wgRightsIcon ) {
110 $wgRightsIcon = str_replace(
111 "{$wgStylePath}/common/images/",
112 "{$wgResourceBasePath}/resources/assets/licenses/",
117 if ( isset( $wgFooterIcons['copyright'] )
118 && isset( $wgFooterIcons['copyright']['copyright'] )
119 && $wgFooterIcons['copyright']['copyright'] === array()
121 if ( $wgCopyrightIcon ) {
122 $wgFooterIcons['copyright']['copyright'] = $wgCopyrightIcon;
123 } elseif ( $wgRightsIcon ||
$wgRightsText ) {
124 $wgFooterIcons['copyright']['copyright'] = array(
125 'url' => $wgRightsUrl,
126 'src' => $wgRightsIcon,
127 'alt' => $wgRightsText,
130 unset( $wgFooterIcons['copyright']['copyright'] );
134 if ( isset( $wgFooterIcons['poweredby'] )
135 && isset( $wgFooterIcons['poweredby']['mediawiki'] )
136 && $wgFooterIcons['poweredby']['mediawiki']['src'] === null
138 $wgFooterIcons['poweredby']['mediawiki']['src'] =
139 "$wgResourceBasePath/resources/assets/poweredby_mediawiki_88x31.png";
143 * Unconditional protection for NS_MEDIAWIKI since otherwise it's too easy for a
144 * sysadmin to set $wgNamespaceProtection incorrectly and leave the wiki insecure.
146 * Note that this is the definition of editinterface and it can be granted to
147 * all users if desired.
149 $wgNamespaceProtection[NS_MEDIAWIKI
] = 'editinterface';
152 * The canonical names of namespaces 6 and 7 are, as of v1.14, "File"
153 * and "File_talk". The old names "Image" and "Image_talk" are
154 * retained as aliases for backwards compatibility.
156 $wgNamespaceAliases['Image'] = NS_FILE
;
157 $wgNamespaceAliases['Image_talk'] = NS_FILE_TALK
;
160 * Initialise $wgLockManagers to include basic FS version
162 $wgLockManagers[] = array(
163 'name' => 'fsLockManager',
164 'class' => 'FSLockManager',
165 'lockDirectory' => "{$wgUploadDirectory}/lockdir",
167 $wgLockManagers[] = array(
168 'name' => 'nullLockManager',
169 'class' => 'NullLockManager',
173 * Initialise $wgLocalFileRepo from backwards-compatible settings
175 if ( !$wgLocalFileRepo ) {
176 $wgLocalFileRepo = array(
177 'class' => 'LocalRepo',
179 'directory' => $wgUploadDirectory,
180 'scriptDirUrl' => $wgScriptPath,
181 'scriptExtension' => $wgScriptExtension,
182 'url' => $wgUploadBaseUrl ?
$wgUploadBaseUrl . $wgUploadPath : $wgUploadPath,
183 'hashLevels' => $wgHashedUploadDirectory ?
2 : 0,
184 'thumbScriptUrl' => $wgThumbnailScriptPath,
185 'transformVia404' => !$wgGenerateThumbnailOnParse,
186 'deletedDir' => $wgDeletedDirectory,
187 'deletedHashLevels' => $wgHashedUploadDirectory ?
3 : 0
191 * Initialise shared repo from backwards-compatible settings
193 if ( $wgUseSharedUploads ) {
194 if ( $wgSharedUploadDBname ) {
195 $wgForeignFileRepos[] = array(
196 'class' => 'ForeignDBRepo',
198 'directory' => $wgSharedUploadDirectory,
199 'url' => $wgSharedUploadPath,
200 'hashLevels' => $wgHashedSharedUploadDirectory ?
2 : 0,
201 'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
202 'transformVia404' => !$wgGenerateThumbnailOnParse,
203 'dbType' => $wgDBtype,
204 'dbServer' => $wgDBserver,
205 'dbUser' => $wgDBuser,
206 'dbPassword' => $wgDBpassword,
207 'dbName' => $wgSharedUploadDBname,
208 'dbFlags' => ( $wgDebugDumpSql ? DBO_DEBUG
: 0 ) | DBO_DEFAULT
,
209 'tablePrefix' => $wgSharedUploadDBprefix,
210 'hasSharedCache' => $wgCacheSharedUploads,
211 'descBaseUrl' => $wgRepositoryBaseUrl,
212 'fetchDescription' => $wgFetchCommonsDescriptions,
215 $wgForeignFileRepos[] = array(
216 'class' => 'FileRepo',
218 'directory' => $wgSharedUploadDirectory,
219 'url' => $wgSharedUploadPath,
220 'hashLevels' => $wgHashedSharedUploadDirectory ?
2 : 0,
221 'thumbScriptUrl' => $wgSharedThumbnailScriptPath,
222 'transformVia404' => !$wgGenerateThumbnailOnParse,
223 'descBaseUrl' => $wgRepositoryBaseUrl,
224 'fetchDescription' => $wgFetchCommonsDescriptions,
228 if ( $wgUseInstantCommons ) {
229 $wgForeignFileRepos[] = array(
230 'class' => 'ForeignAPIRepo',
231 'name' => 'wikimediacommons',
232 'apibase' => WebRequest
::detectProtocol() === 'https' ?
233 'https://commons.wikimedia.org/w/api.php' :
234 'http://commons.wikimedia.org/w/api.php',
236 'fetchDescription' => true,
237 'descriptionCacheExpiry' => 43200,
238 'apiThumbCacheExpiry' => 86400,
242 * Add on default file backend config for file repos.
243 * FileBackendGroup will handle initializing the backends.
245 if ( !isset( $wgLocalFileRepo['backend'] ) ) {
246 $wgLocalFileRepo['backend'] = $wgLocalFileRepo['name'] . '-backend';
248 foreach ( $wgForeignFileRepos as &$repo ) {
249 if ( !isset( $repo['directory'] ) && $repo['class'] === 'ForeignAPIRepo' ) {
250 $repo['directory'] = $wgUploadDirectory; // b/c
252 if ( !isset( $repo['backend'] ) ) {
253 $repo['backend'] = $repo['name'] . '-backend';
256 unset( $repo ); // no global pollution; destroy reference
258 if ( $wgRCFilterByAge ) {
259 // Trim down $wgRCLinkDays so that it only lists links which are valid
260 // as determined by $wgRCMaxAge.
261 // Note that we allow 1 link higher than the max for things like 56 days but a 60 day link.
262 sort( $wgRCLinkDays );
264 // @codingStandardsIgnoreStart Generic.CodeAnalysis.ForLoopWithTestFunctionCall.NotAllowed
265 for ( $i = 0; $i < count( $wgRCLinkDays ); $i++
) {
266 // @codingStandardsIgnoreEnd
267 if ( $wgRCLinkDays[$i] >= $wgRCMaxAge / ( 3600 * 24 ) ) {
268 $wgRCLinkDays = array_slice( $wgRCLinkDays, 0, $i +
1, false );
275 $wgSkipSkins[] = $wgSkipSkin;
279 // Use a closure to avoid leaking into global state
280 call_user_func( function () use ( $wgValidSkinNames ) {
281 $factory = SkinFactory
::getDefaultInstance();
282 foreach ( $wgValidSkinNames as $name => $skin ) {
283 $factory->register( $name, $skin, function () use ( $name, $skin ) {
284 $class = "Skin$skin";
285 return new $class( $name );
288 // Register a hidden "fallback" skin
289 $factory->register( 'fallback', 'Fallback', function () {
290 return new SkinFallback
;
293 $wgSkipSkins[] = 'fallback';
295 if ( $wgLocalInterwiki ) {
296 array_unshift( $wgLocalInterwikis, $wgLocalInterwiki );
299 // Set default shared prefix
300 if ( $wgSharedPrefix === false ) {
301 $wgSharedPrefix = $wgDBprefix;
304 if ( !$wgCookiePrefix ) {
305 if ( $wgSharedDB && $wgSharedPrefix && in_array( 'user', $wgSharedTables ) ) {
306 $wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;
307 } elseif ( $wgSharedDB && in_array( 'user', $wgSharedTables ) ) {
308 $wgCookiePrefix = $wgSharedDB;
309 } elseif ( $wgDBprefix ) {
310 $wgCookiePrefix = $wgDBname . '_' . $wgDBprefix;
312 $wgCookiePrefix = $wgDBname;
315 $wgCookiePrefix = strtr( $wgCookiePrefix, '=,; +."\'\\[', '__________' );
317 if ( $wgEnableEmail ) {
318 $wgUseEnotif = $wgEnotifUserTalk ||
$wgEnotifWatchlist;
320 // Disable all other email settings automatically if $wgEnableEmail
321 // is set to false. - bug 63678
322 $wgAllowHTMLEmail = false;
323 $wgEmailAuthentication = false; // do not require auth if you're not sending email anyway
324 $wgEnableUserEmail = false;
325 $wgEnotifFromEditor = false;
326 $wgEnotifImpersonal = false;
327 $wgEnotifMaxRecips = 0;
328 $wgEnotifMinorEdits = false;
329 $wgEnotifRevealEditorAddress = false;
330 $wgEnotifUseJobQ = false;
331 $wgEnotifUseRealName = false;
332 $wgEnotifUserTalk = false;
333 $wgEnotifWatchlist = false;
334 unset( $wgGroupPermissions['user']['sendemail'] );
335 $wgUseEnotif = false;
336 $wgUserEmailUseReplyTo = false;
337 $wgUsersNotifiedOnAllChanges = array();
340 // Doesn't make sense to have if disabled.
341 if ( !$wgEnotifMinorEdits ) {
342 $wgHiddenPrefs[] = 'enotifminoredits';
345 if ( $wgMetaNamespace === false ) {
346 $wgMetaNamespace = str_replace( ' ', '_', $wgSitename );
349 // Default value is either the suhosin limit or -1 for unlimited
350 if ( $wgResourceLoaderMaxQueryLength === false ) {
351 $maxValueLength = ini_get( 'suhosin.get.max_value_length' );
352 $wgResourceLoaderMaxQueryLength = $maxValueLength > 0 ?
$maxValueLength : -1;
356 * Definitions of the NS_ constants are in Defines.php
359 $wgCanonicalNamespaceNames = array(
361 NS_SPECIAL
=> 'Special',
364 NS_USER_TALK
=> 'User_talk',
365 NS_PROJECT
=> 'Project',
366 NS_PROJECT_TALK
=> 'Project_talk',
368 NS_FILE_TALK
=> 'File_talk',
369 NS_MEDIAWIKI
=> 'MediaWiki',
370 NS_MEDIAWIKI_TALK
=> 'MediaWiki_talk',
371 NS_TEMPLATE
=> 'Template',
372 NS_TEMPLATE_TALK
=> 'Template_talk',
374 NS_HELP_TALK
=> 'Help_talk',
375 NS_CATEGORY
=> 'Category',
376 NS_CATEGORY_TALK
=> 'Category_talk',
380 if ( is_array( $wgExtraNamespaces ) ) {
381 $wgCanonicalNamespaceNames = $wgCanonicalNamespaceNames +
$wgExtraNamespaces;
384 // These are now the same, always
385 // To determine the user language, use $wgLang->getCode()
386 $wgContLanguageCode = $wgLanguageCode;
388 // Easy to forget to falsify $wgShowIPinHeader for static caches.
389 // If file cache or squid cache is on, just disable this (DWIMD).
390 // Do the same for $wgDebugToolbar.
391 if ( $wgUseFileCache ||
$wgUseSquid ) {
392 $wgShowIPinHeader = false;
393 $wgDebugToolbar = false;
396 // We always output HTML5 since 1.22, overriding these is no longer supported
397 // we set them here for extensions that depend on its value.
399 $wgXhtmlDefaultNamespace = 'http://www.w3.org/1999/xhtml';
400 $wgJsMimeType = 'text/javascript';
402 if ( !$wgHtml5Version && $wgAllowRdfaAttributes ) {
403 // see http://www.w3.org/TR/rdfa-in-html/#document-conformance
404 if ( $wgMimeType == 'application/xhtml+xml' ) {
405 $wgHtml5Version = 'XHTML+RDFa 1.0';
407 $wgHtml5Version = 'HTML+RDFa 1.0';
411 // Blacklisted file extensions shouldn't appear on the "allowed" list
412 $wgFileExtensions = array_values( array_diff ( $wgFileExtensions, $wgFileBlacklist ) );
414 if ( $wgInvalidateCacheOnLocalSettingsChange ) {
415 // @codingStandardsIgnoreStart Generic.PHP.NoSilencedErrors.Discouraged - No GlobalFunction here yet.
416 $wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime
( "$IP/LocalSettings.php" ) ) );
417 // @codingStandardsIgnoreEnd
420 if ( $wgNewUserLog ) {
421 // Add a new log type
422 $wgLogTypes[] = 'newusers';
423 $wgLogNames['newusers'] = 'newuserlogpage';
424 $wgLogHeaders['newusers'] = 'newuserlogpagetext';
425 $wgLogActionsHandlers['newusers/newusers'] = 'NewUsersLogFormatter';
426 $wgLogActionsHandlers['newusers/create'] = 'NewUsersLogFormatter';
427 $wgLogActionsHandlers['newusers/create2'] = 'NewUsersLogFormatter';
428 $wgLogActionsHandlers['newusers/byemail'] = 'NewUsersLogFormatter';
429 $wgLogActionsHandlers['newusers/autocreate'] = 'NewUsersLogFormatter';
432 if ( $wgPageLanguageUseDB ) {
433 $wgLogTypes[] = 'pagelang';
434 $wgLogActionsHandlers['pagelang/pagelang'] = 'PageLangLogFormatter';
437 if ( $wgCookieSecure === 'detect' ) {
438 $wgCookieSecure = ( WebRequest
::detectProtocol() === 'https' );
441 // Back compatibility for $wgRateLimitLog deprecated with 1.23
442 if ( $wgRateLimitLog && !array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) {
443 $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog;
446 if ( $wgProfileOnly ) {
447 $wgDebugLogGroups['profileoutput'] = $wgDebugLogFile;
448 $wgDebugLogFile = '';
451 wfProfileOut( $fname . '-defaults' );
453 // Disable MWDebug for command line mode, this prevents MWDebug from eating up
454 // all the memory from logging SQL queries on maintenance scripts
455 global $wgCommandLineMode;
456 if ( $wgDebugToolbar && !$wgCommandLineMode ) {
457 wfProfileIn( $fname . '-debugtoolbar' );
459 wfProfileOut( $fname . '-debugtoolbar' );
462 if ( !class_exists( 'AutoLoader' ) ) {
463 require_once "$IP/includes/AutoLoader.php";
466 wfProfileIn( $fname . '-exception' );
467 MWExceptionHandler
::installHandler();
468 wfProfileOut( $fname . '-exception' );
470 wfProfileIn( $fname . '-includes' );
471 require_once "$IP/includes/normal/UtfNormalUtil.php";
472 require_once "$IP/includes/GlobalFunctions.php";
473 require_once "$IP/includes/normal/UtfNormalDefines.php";
474 wfProfileOut( $fname . '-includes' );
476 wfProfileIn( $fname . '-defaults2' );
478 if ( $wgCanonicalServer === false ) {
479 $wgCanonicalServer = wfExpandUrl( $wgServer, PROTO_HTTP
);
483 $serverParts = wfParseUrl( $wgCanonicalServer );
484 if ( $wgServerName !== false ) {
485 wfWarn( '$wgServerName should be derived from $wgCanonicalServer, '
486 . 'not customized. Overwriting $wgServerName.' );
488 $wgServerName = $serverParts['host'];
489 unset( $serverParts );
491 // Set defaults for configuration variables
492 // that are derived from the server name by default
493 if ( $wgEmergencyContact === false ) {
494 $wgEmergencyContact = 'wikiadmin@' . $wgServerName;
497 if ( $wgPasswordSender === false ) {
498 $wgPasswordSender = 'apache@' . $wgServerName;
501 if ( $wgSecureLogin && substr( $wgServer, 0, 2 ) !== '//' ) {
502 $wgSecureLogin = false;
503 wfWarn( 'Secure login was enabled on a server that only supports '
504 . 'HTTP or HTTPS. Disabling secure login.' );
507 // Now that GlobalFunctions is loaded, set defaults that depend
509 if ( $wgTmpDirectory === false ) {
510 wfProfileIn( $fname . '-tempDir' );
511 $wgTmpDirectory = wfTempDir();
512 wfProfileOut( $fname . '-tempDir' );
515 wfProfileOut( $fname . '-defaults2' );
516 wfProfileIn( $fname . '-misc1' );
518 // Raise the memory limit if it's too low
522 * Set up the timezone, suppressing the pseudo-security warning in PHP 5.1+
523 * that happens whenever you use a date function without the timezone being
524 * explicitly set. Inspired by phpMyAdmin's treatment of the problem.
526 if ( is_null( $wgLocaltimezone ) ) {
527 wfSuppressWarnings();
528 $wgLocaltimezone = date_default_timezone_get();
532 date_default_timezone_set( $wgLocaltimezone );
533 if ( is_null( $wgLocalTZoffset ) ) {
534 $wgLocalTZoffset = date( 'Z' ) / 60;
537 // Useful debug output
538 if ( $wgCommandLineMode ) {
539 $wgRequest = new FauxRequest( array() );
541 wfDebug( "\n\nStart command line script $self\n" );
543 // Can't stub this one, it sets up $_GET and $_REQUEST in its constructor
544 $wgRequest = new WebRequest
;
546 $debug = "\n\nStart request {$wgRequest->getMethod()} {$wgRequest->getRequestURL()}\n";
548 if ( $wgDebugPrintHttpHeaders ) {
549 $debug .= "HTTP HEADERS:\n";
551 foreach ( $wgRequest->getAllHeaders() as $name => $value ) {
552 $debug .= "$name: $value\n";
558 wfProfileOut( $fname . '-misc1' );
559 wfProfileIn( $fname . '-memcached' );
561 $wgMemc = wfGetMainCache();
562 $messageMemc = wfGetMessageCacheStorage();
563 $parserMemc = wfGetParserCacheStorage();
564 $wgLangConvMemc = wfGetLangConverterCacheStorage();
566 wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
567 ', message: ' . get_class( $messageMemc ) .
568 ', parser: ' . get_class( $parserMemc ) );
570 wfProfileOut( $fname . '-memcached' );
572 // Most of the config is out, some might want to run hooks here.
573 wfRunHooks( 'SetupAfterCache' );
575 wfProfileIn( $fname . '-session' );
577 if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) {
578 // If session.auto_start is there, we can't touch session name
579 if ( !wfIniGetBool( 'session.auto_start' ) ) {
580 session_name( $wgSessionName ?
$wgSessionName : $wgCookiePrefix . '_session' );
583 if ( $wgRequest->checkSessionCookie() ||
isset( $_COOKIE[$wgCookiePrefix . 'Token'] ) ) {
588 wfProfileOut( $fname . '-session' );
589 wfProfileIn( $fname . '-globals' );
592 * @var Language $wgContLang
594 $wgContLang = Language
::factory( $wgLanguageCode );
595 $wgContLang->initEncoding();
596 $wgContLang->initContLang();
598 // Now that variant lists may be available...
599 $wgRequest->interpolateTitle();
604 $wgUser = RequestContext
::getMain()->getUser(); // BackCompat
607 * @var Language $wgLang
609 $wgLang = new StubUserLang
;
612 * @var OutputPage $wgOut
614 $wgOut = RequestContext
::getMain()->getOutput(); // BackCompat
617 * @var Parser $wgParser
619 $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) );
621 if ( !is_object( $wgAuth ) ) {
622 $wgAuth = new AuthPlugin
;
623 wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) );
627 * @var Title $wgTitle
632 * @deprecated since 1.24 Use DeferredUpdates::addUpdate instead
635 $wgDeferredUpdateList = array();
637 wfProfileOut( $fname . '-globals' );
638 wfProfileIn( $fname . '-extensions' );
640 // Extension setup functions for extensions other than skins
641 // Entries should be added to this variable during the inclusion
642 // of the extension file. This allows the extension to perform
643 // any necessary initialisation in the fully initialised environment
644 foreach ( $wgExtensionFunctions as $func ) {
645 // Allow closures in PHP 5.3+
646 if ( is_object( $func ) && $func instanceof Closure
) {
647 $profName = $fname . '-extensions-closure';
648 } elseif ( is_array( $func ) ) {
649 if ( is_object( $func[0] ) ) {
650 $profName = $fname . '-extensions-' . get_class( $func[0] ) . '::' . $func[1];
652 $profName = $fname . '-extensions-' . implode( '::', $func );
655 $profName = $fname . '-extensions-' . strval( $func );
658 wfProfileIn( $profName );
659 call_user_func( $func );
660 wfProfileOut( $profName );
663 wfDebug( "Fully initialised\n" );
664 $wgFullyInitialised = true;
666 wfProfileOut( $fname . '-extensions' );
667 wfProfileOut( $fname );