X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FWebStart.php;h=15804c7bd41650d15ffa6b5cd67feb3bd9fb9ecc;hb=50a035cd6bea9a40014b0dd9ad344fdd9abf46b6;hp=c5e74576f0eb3ae2e5ac18822505fad9648b56e0;hpb=eff3a3bc47797f56fd0fa1f55a63aac349d448c1;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/WebStart.php b/includes/WebStart.php
index c5e74576f0..15804c7bd4 100644
--- a/includes/WebStart.php
+++ b/includes/WebStart.php
@@ -26,31 +26,15 @@
* @file
*/
-# Die if register_globals is enabled (PHP <=5.3)
-# This must be done before any globals are set by the code
-if ( ini_get( 'register_globals' ) ) {
- die( 'MediaWiki does not support installations where register_globals is enabled. Please see '
- . 'mediawiki.org '
- . 'for help on how to disable it.' );
+if ( ini_get( 'mbstring.func_overload' ) ) {
+ die( 'MediaWiki does not support installations where mbstring.func_overload is non-zero.' );
}
-if ( function_exists( 'get_magic_quotes_gpc' ) && get_magic_quotes_gpc() ) {
- die( 'MediaWiki does not function when magic quotes are enabled. Please see the '
- . 'PHP Manual '
- . 'for help on how to disable magic quotes.' );
-}
-
-
-# bug 15461: Make IE8 turn off content sniffing. Everybody else should ignore this
+# T17461: Make IE8 turn off content sniffing. Everybody else should ignore this
# We're adding it here so that it's *always* set, even for alternate entry
# points and when $wgOut gets disabled or overridden.
header( 'X-Content-Type-Options: nosniff' );
-# Approximate $_SERVER['REQUEST_TIME_FLOAT'] for PHP<5.4
-if ( !isset( $_SERVER['REQUEST_TIME_FLOAT'] ) ) {
- $_SERVER['REQUEST_TIME_FLOAT'] = microtime( true );
-}
-
/**
* @var float Request start time as fractional seconds since epoch
* @deprecated since 1.25; use $_SERVER['REQUEST_TIME_FLOAT'] or
@@ -86,12 +70,11 @@ require_once "$IP/includes/AutoLoader.php";
require_once "$IP/includes/Defines.php";
# Start the profiler
-$wgProfiler = array();
+$wgProfiler = [];
if ( file_exists( "$IP/StartProfiler.php" ) ) {
require "$IP/StartProfiler.php";
}
-
# Load default settings
require_once "$IP/includes/DefaultSettings.php";
@@ -121,6 +104,9 @@ if ( !interface_exists( 'Psr\Log\LoggerInterface' ) ) {
die( 1 );
}
+# Install a header callback
+MediaWiki\HeaderCallback::register();
+
if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
# Use a callback function to configure MediaWiki
call_user_func( MW_CONFIG_CALLBACK );
@@ -141,7 +127,6 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) {
require_once MW_CONFIG_FILE;
}
-
# Initialise output buffering
# Check that there is no previous output or previously set up buffers, because
# that would cause us to potentially mix gzip and non-gzip output, creating a
@@ -151,9 +136,7 @@ if ( ob_get_level() == 0 ) {
ob_start( 'wfOutputHandler' );
}
-if ( !defined( 'MW_NO_SETUP' ) ) {
- require_once "$IP/includes/Setup.php";
-}
+require_once "$IP/includes/Setup.php";
# Multiple DBs or commits might be used; keep the request as transactional as possible
if ( isset( $_SERVER['REQUEST_METHOD'] ) && $_SERVER['REQUEST_METHOD'] === 'POST' ) {