X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=cfb2ac16fa25df2e0c67500c522728ba073c8bd7;hb=4ed9a5bcdd5678eb072563dd13faea56ff5153c0;hp=226780080d8a479b205b8d62931ddad45a8134b8;hpb=bf7284d975183f81feabb4f4c8f0f09a4ad9621a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 226780080d..cfb2ac16fa 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -156,12 +156,6 @@ if ( $wgArticlePath === false ) { } } -if ( !empty( $wgActionPaths ) && !isset( $wgActionPaths['view'] ) ) { - // 'view' is assumed the default action path everywhere in the code - // but is rarely filled in $wgActionPaths - $wgActionPaths['view'] = $wgArticlePath; -} - if ( $wgResourceBasePath === null ) { $wgResourceBasePath = $wgScriptPath; } @@ -386,6 +380,7 @@ $wgSkipSkins[] = 'apioutput'; if ( $wgLocalInterwiki ) { // Hard deprecated in 1.34. wfDeprecated( '$wgLocalInterwiki – use $wgLocalInterwikis instead', '1.23' ); + // @phan-suppress-next-line PhanUndeclaredVariableDim array_unshift( $wgLocalInterwikis, $wgLocalInterwiki ); } @@ -438,17 +433,6 @@ if ( $wgMetaNamespace === false ) { $wgMetaNamespace = str_replace( ' ', '_', $wgSitename ); } -// Default value is 2000 or the suhosin limit if it is between 1 and 2000 -if ( $wgResourceLoaderMaxQueryLength === false ) { - $suhosinMaxValueLength = (int)ini_get( 'suhosin.get.max_value_length' ); - if ( $suhosinMaxValueLength > 0 && $suhosinMaxValueLength < 2000 ) { - $wgResourceLoaderMaxQueryLength = $suhosinMaxValueLength; - } else { - $wgResourceLoaderMaxQueryLength = 2000; - } - unset( $suhosinMaxValueLength ); -} - // Ensure the minimum chunk size is less than PHP upload limits or the maximum // upload size. $wgMinUploadChunkSize = min( @@ -547,12 +531,6 @@ if ( isset( $wgSquidMaxage ) ) { $wgSquidMaxage = $wgCdnMaxAge; } -// Easy to forget to falsify $wgDebugToolbar for static caches. -// If file cache or CDN cache is on, just disable this (DWIMD). -if ( $wgUseFileCache || $wgUseCdn ) { - $wgDebugToolbar = false; -} - // Blacklisted file extensions shouldn't appear on the "allowed" list $wgFileExtensions = array_values( array_diff( $wgFileExtensions, $wgFileBlacklist ) ); @@ -617,15 +595,11 @@ if ( $wgPHPSessionHandling !== 'enable' && if ( defined( 'MW_NO_SESSION' ) ) { // If the entry point wants no session, force 'disable' here unless they // specifically set it to the (undocumented) 'warn'. + // @phan-suppress-next-line PhanUndeclaredConstant $wgPHPSessionHandling = MW_NO_SESSION === 'warn' ? 'warn' : 'disable'; } -// Disable MWDebug for command line mode, this prevents MWDebug from eating up -// all the memory from logging SQL queries on maintenance scripts -global $wgCommandLineMode; -if ( $wgDebugToolbar && !$wgCommandLineMode ) { - MWDebug::init(); -} +MWDebug::setup(); // Reset the global service locator, so any services that have already been created will be // re-created while taking into account any custom settings and extensions. @@ -789,14 +763,6 @@ if ( $wgCommandLineMode ) { $wgMemc = ObjectCache::getLocalClusterInstance(); $messageMemc = wfGetMessageCacheStorage(); -wfDebugLog( 'caches', - 'cluster: ' . get_class( $wgMemc ) . - ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) . - ', stash: ' . $wgMainStash . - ', message: ' . get_class( $messageMemc ) . - ', session: ' . get_class( ObjectCache::getInstance( $wgSessionCacheType ) ) -); - // Most of the config is out, some might want to run hooks here. Hooks::run( 'SetupAfterCache' );