X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=209edefc282c359b1f9e757f081cb92afb53ccf9;hb=5b52c881be2c791209ec1d24cfab5790e19b0ec8;hp=d1269ad595df38f3d02b531bae2ae827697df969;hpb=f726bbf6e7f26cd268e6c44a4af675c15a337921;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index d1269ad595..209edefc28 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -341,11 +341,6 @@ if ( !$wgEnotifMinorEdits ) { $wgHiddenPrefs[] = 'enotifminoredits'; } -# $wgDisabledActions is deprecated as of 1.18 -foreach ( $wgDisabledActions as $action ) { - $wgActions[$action] = false; -} - # We always output HTML5 since 1.22, overriding these is no longer supported # we set them here for extensions that depend on its value. $wgHtml5 = true; @@ -417,8 +412,8 @@ MWExceptionHandler::installHandler(); wfProfileOut( $fname . '-exception' ); wfProfileIn( $fname . '-includes' ); -require_once "$IP/includes/GlobalFunctions.php"; require_once "$IP/includes/normal/UtfNormalUtil.php"; +require_once "$IP/includes/GlobalFunctions.php"; require_once "$IP/includes/normal/UtfNormalDefines.php"; wfProfileOut( $fname . '-includes' ); @@ -457,7 +452,10 @@ if ( !$wgHTCPRouting && $wgHTCPMulticastAddress ) { ); } -$wgDeferredUpdateList = array(); // b/c +// Back compatibility for $wgRateLimitLog deprecated with 1.23 +if ( $wgRateLimitLog && ! array_key_exists( 'ratelimit', $wgDebugLogGroups ) ) { + $wgDebugLogGroups['ratelimit'] = $wgRateLimitLog; +} wfProfileOut( $fname . '-defaults2' ); wfProfileIn( $fname . '-misc1' ); @@ -503,22 +501,21 @@ if ( $wgCommandLineMode ) { } wfProfileOut( $fname . '-misc1' ); -if ( !defined( 'MW_SETUP_NO_CACHE' ) ) { - wfProfileIn( $fname . '-memcached' ); +wfProfileIn( $fname . '-memcached' ); - $wgMemc = wfGetMainCache(); - $messageMemc = wfGetMessageCacheStorage(); - $parserMemc = wfGetParserCacheStorage(); - $wgLangConvMemc = wfGetLangConverterCacheStorage(); +$wgMemc = wfGetMainCache(); +$messageMemc = wfGetMessageCacheStorage(); +$parserMemc = wfGetParserCacheStorage(); +$wgLangConvMemc = wfGetLangConverterCacheStorage(); - wfDebug( 'CACHES: ' . get_class( $wgMemc ) . '[main] ' . - get_class( $messageMemc ) . '[message] ' . - get_class( $parserMemc ) . "[parser]\n" ); +wfDebug( 'CACHES: ' . get_class( $wgMemc ) . '[main] ' . + get_class( $messageMemc ) . '[message] ' . + get_class( $parserMemc ) . "[parser]\n" ); - wfProfileOut( $fname . '-memcached' ); - # # Most of the config is out, some might want to run hooks here. - wfRunHooks( 'SetupAfterCache' ); -} +wfProfileOut( $fname . '-memcached' ); + +# # Most of the config is out, some might want to run hooks here. +wfRunHooks( 'SetupAfterCache' ); wfProfileIn( $fname . '-session' ); @@ -537,44 +534,42 @@ if ( !defined( 'MW_NO_SESSION' ) && !$wgCommandLineMode ) { } wfProfileOut( $fname . '-session' ); +wfProfileIn( $fname . '-globals' ); -if ( !defined( 'MW_SETUP_NO_CONTEXT' ) ) { - wfProfileIn( $fname . '-globals' ); +$wgContLang = Language::factory( $wgLanguageCode ); +$wgContLang->initEncoding(); +$wgContLang->initContLang(); - $wgContLang = Language::factory( $wgLanguageCode ); - $wgContLang->initEncoding(); - $wgContLang->initContLang(); +// Now that variant lists may be available... +$wgRequest->interpolateTitle(); +$wgUser = RequestContext::getMain()->getUser(); # BackCompat - // Now that variant lists may be available... - $wgRequest->interpolateTitle(); - $wgUser = RequestContext::getMain()->getUser(); # BackCompat - - /** - * @var $wgLang Language - */ - $wgLang = new StubUserLang; +/** + * @var $wgLang Language + */ +$wgLang = new StubUserLang; - /** - * @var OutputPage - */ - $wgOut = RequestContext::getMain()->getOutput(); # BackCompat +/** + * @var OutputPage + */ +$wgOut = RequestContext::getMain()->getOutput(); # BackCompat - /** - * @var $wgParser Parser - */ - $wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ); +/** + * @var $wgParser Parser + */ +$wgParser = new StubObject( 'wgParser', $wgParserConf['class'], array( $wgParserConf ) ); - if ( !is_object( $wgAuth ) ) { - $wgAuth = new StubObject( 'wgAuth', 'AuthPlugin' ); - wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) ); - } +if ( !is_object( $wgAuth ) ) { + $wgAuth = new AuthPlugin; + wfRunHooks( 'AuthPluginSetup', array( &$wgAuth ) ); +} - # Placeholders in case of DB error - $wgTitle = null; +# Placeholders in case of DB error +$wgTitle = null; - wfProfileOut( $fname . '-globals' ); -} +$wgDeferredUpdateList = array(); +wfProfileOut( $fname . '-globals' ); wfProfileIn( $fname . '-extensions' ); # Extension setup functions for extensions other than skins