X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FWebStart.php;h=c9aecce4e01a51b53f17215cfed027b638c5f221;hb=0b9edb467bbe687ff4e29088a4e5f008770a07a8;hp=e4d93f9a30d2b0d56e2480972435aebd421d01c7;hpb=2b7fbceb23a4737de36cfc48d542a21dd6f53a7a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebStart.php b/includes/WebStart.php index e4d93f9a30..c9aecce4e0 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -50,13 +50,10 @@ unset( $IP ); # 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 = realpath( '.' ) ?: dirname( __DIR__ ); + $IP = dirname( __DIR__ ); } // If no LocalSettings file exists, try to display an error page @@ -81,14 +78,10 @@ if ( !defined( 'MW_CONFIG_CALLBACK' ) ) { // 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 ) { - require_once "$IP/includes/OutputHandler.php"; - ob_start( 'wfOutputHandler' ); + ob_start( 'MediaWiki\\OutputHandler::handle' ); } } define( 'MW_SETUP_CALLBACK', 'wfWebStartSetup' );