dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update git submodules
[lhc/web/wiklou.git]
/
includes
/
WebStart.php
diff --git
a/includes/WebStart.php
b/includes/WebStart.php
index
e4d93f9
..
6f3aa71
100644
(file)
--- a/
includes/WebStart.php
+++ b/
includes/WebStart.php
@@
-41,8
+41,6
@@
header( 'X-Content-Type-Options: nosniff' );
*/
$wgRequestTime = $_SERVER['REQUEST_TIME_FLOAT'];
*/
$wgRequestTime = $_SERVER['REQUEST_TIME_FLOAT'];
-unset( $IP );
-
# Valid web server entry point, enable includes.
# Please don't move this line to includes/Defines.php. This line essentially
# defines a valid entry point. If you put it in includes/Defines.php, then
# Valid web server entry point, enable includes.
# Please don't move this line to includes/Defines.php. This line essentially
# defines a valid entry point. If you put it in includes/Defines.php, then
@@
-50,13
+48,10
@@
unset( $IP );
# its purpose.
define( 'MEDIAWIKI', true );
# its purpose.
define( 'MEDIAWIKI', true );
-# Full path to working directory.
-# Makes it possible to for example to have effective exclude path in apc.
-# __DIR__ breaks symlinked includes, but realpath() returns false
-# if we don't have permissions on parent directories.
+# Full path to the installation directory.
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
- $IP =
realpath( '.' ) ?:
dirname( __DIR__ );
+ $IP = dirname( __DIR__ );
}
// If no LocalSettings file exists, try to display an error page
}
// If no LocalSettings file exists, try to display an error page
@@
-81,14
+76,10
@@
if ( !defined( 'MW_CONFIG_CALLBACK' ) ) {
// Custom setup for WebStart entry point
if ( !defined( 'MW_SETUP_CALLBACK' ) ) {
function wfWebStartSetup() {
// Custom setup for WebStart entry point
if ( !defined( 'MW_SETUP_CALLBACK' ) ) {
function wfWebStartSetup() {
- # 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
- # big mess.
- global $IP;
+ // Initialise output buffering
+ // Check for previously set up buffers, to avoid a mix of gzip and non-gzip output.
if ( ob_get_level() == 0 ) {
if ( ob_get_level() == 0 ) {
- require_once "$IP/includes/OutputHandler.php";
- ob_start( 'wfOutputHandler' );
+ ob_start( 'MediaWiki\\OutputHandler::handle' );
}
}
define( 'MW_SETUP_CALLBACK', 'wfWebStartSetup' );
}
}
define( 'MW_SETUP_CALLBACK', 'wfWebStartSetup' );