X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FWebStart.php;h=da4bc8792059b45d19c92c23018a81980d27cb41;hb=132f7bb89f38780f1433caff8ec643e91a850a8a;hp=cb35ee56fd66165ccb61911bebc66851dde3a186;hpb=dd77f5818a93c0a03f7a9b4162b37a7db40a673d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/WebStart.php b/includes/WebStart.php index cb35ee56fd..da4bc87920 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -58,8 +58,8 @@ if ( $IP === false ) { $IP = realpath( '.' ) ?: dirname( __DIR__ ); } -# Load the profiler -require_once "$IP/includes/profiler/Profiler.php"; +# Grab profiling functions +require_once "$IP/includes/profiler/ProfilerFunctions.php"; $wgRUstart = wfGetRusage() ?: array(); # Start the autoloader, so that extensions can derive classes from core files @@ -74,11 +74,13 @@ if ( file_exists( "$IP/StartProfiler.php" ) ) { require "$IP/StartProfiler.php"; } -wfProfileIn( 'WebStart.php-conf' ); # Load default settings require_once "$IP/includes/DefaultSettings.php"; +# Load global functions +require_once "$IP/includes/GlobalFunctions.php"; + # Load composer's autoloader if present if ( is_readable( "$IP/vendor/autoload.php" ) ) { require_once "$IP/vendor/autoload.php"; @@ -96,7 +98,7 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { # the wiki installer needs to be launched or the generated file uploaded to # the root wiki directory. Give a hint, if it is not readable by the server. if ( !is_readable( MW_CONFIG_FILE ) ) { - require_once "$IP/includes/templates/NoLocalSettings.php"; + require_once "$IP/includes/NoLocalSettings.php"; die(); } @@ -104,18 +106,15 @@ if ( defined( 'MW_CONFIG_CALLBACK' ) ) { require_once MW_CONFIG_FILE; } -wfProfileOut( 'WebStart.php-conf' ); -wfProfileIn( 'WebStart.php-ob_start' ); # 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. -if ( !defined( 'MW_NO_OUTPUT_BUFFER' ) && ob_get_level() == 0 ) { +if ( ob_get_level() == 0 ) { require_once "$IP/includes/OutputHandler.php"; ob_start( 'wfOutputHandler' ); } -wfProfileOut( 'WebStart.php-ob_start' ); if ( !defined( 'MW_NO_SETUP' ) ) { require_once "$IP/includes/Setup.php";