X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=ac00fab74196bf07512c87ecc996c543b20c2359;hb=4fad94948359ab67e312355534977138754c123b;hp=5ea96dd0404d8eca6ad40181e26aa857e1de8901;hpb=17eba67ef329fb8f444f681e6ff515d1919376cb;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 5ea96dd040..ac00fab741 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -49,6 +49,10 @@ if ( !isset( $wgVersion ) ) { mb_internal_encoding( 'UTF-8' ); +// Set the configured locale on all requests for consisteny +putenv( "LC_ALL=$wgShellLocale" ); +setlocale( LC_ALL, $wgShellLocale ); + // Set various default paths sensibly... $ps_default = Profiler::instance()->scopedProfileIn( $fname . '-defaults' ); @@ -177,6 +181,20 @@ $wgLockManagers[] = [ 'class' => 'NullLockManager', ]; +/** + * Default parameters for the "" tag. + * @see DefaultSettings.php for description of the fields. + */ +$wgGalleryOptions += [ + 'imagesPerRow' => 0, + 'imageWidth' => 120, + 'imageHeight' => 120, + 'captionLength' => true, + 'showBytes' => true, + 'showDimensions' => true, + 'mode' => 'traditional', +]; + /** * Initialise $wgLocalFileRepo from backwards-compatible settings */ @@ -665,14 +683,19 @@ $ps_memcached = Profiler::instance()->scopedProfileIn( $fname . '-memcached' ); $wgMemc = wfGetMainCache(); $messageMemc = wfGetMessageCacheStorage(); -$parserMemc = wfGetParserCacheStorage(); + +/** + * @deprecated since 1.30 + */ +$parserMemc = new DeprecatedGlobal( 'parserMemc', function() { + return MediaWikiServices::getInstance()->getParserCache()->getCacheStorage(); +}, '1.30' ); wfDebugLog( 'caches', 'cluster: ' . get_class( $wgMemc ) . ', WAN: ' . ( $wgMainWANCache === CACHE_NONE ? 'CACHE_NONE' : $wgMainWANCache ) . ', stash: ' . $wgMainStash . ', message: ' . get_class( $messageMemc ) . - ', parser: ' . get_class( $parserMemc ) . ', session: ' . get_class( ObjectCache::getInstance( $wgSessionCacheType ) ) );