X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FSetup.php;h=f34b176e68b9f54f73eedea0047807dce9b613d8;hb=6612e4867f60fc1a8bced67bcf7489d24e2db675;hp=641f1f903035d8bb6e085155c0aaa0df06c88ec9;hpb=9e4326370946eace9a20cd3d89f57a027f64257a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 641f1f9030..f34b176e68 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -55,7 +55,7 @@ if ( ini_get( 'mbstring.func_overload' ) ) { // Start the autoloader, so that extensions can derive classes from core files require_once "$IP/includes/AutoLoader.php"; -// Load up some global defines +// Load global constants require_once "$IP/includes/Defines.php"; // Load default settings @@ -89,9 +89,17 @@ if ( !interface_exists( 'Psr\Log\LoggerInterface' ) ) { die( 1 ); } +/** + * Changes to the PHP environment that don't vary on configuration. + */ + // Install a header callback MediaWiki\HeaderCallback::register(); +// Set the encoding used by reading HTTP input, writing HTTP output. +// This is also the default for mbstring functions. +mb_internal_encoding( 'UTF-8' ); + /** * Load LocalSettings.php */ @@ -128,8 +136,6 @@ ExtensionRegistry::getInstance()->loadFromQueue(); // Don't let any other extensions load ExtensionRegistry::getInstance()->finish(); -mb_internal_encoding( 'UTF-8' ); - // Set the configured locale on all requests for consisteny putenv( "LC_ALL=$wgShellLocale" ); setlocale( LC_ALL, $wgShellLocale ); @@ -754,6 +760,8 @@ Profiler::instance()->scopedProfileOut( $ps_default2 ); $ps_misc = Profiler::instance()->scopedProfileIn( $fname . '-misc' ); // Raise the memory limit if it's too low +// Note, this makes use of wfDebug, and thus should not be before +// MWDebug::init() is called. wfMemoryLimit(); /**