From e5d496b1210e25c9f139ea2f16bc167197f40f3a Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Sat, 16 Apr 2011 19:23:45 +0000 Subject: [PATCH] Followup r86228 (profiling cleanup): * Move autoloader up in Maintenance as well * Add setInstance() method to Profiler, dumpHTML will need it --- includes/profiler/Profiler.php | 8 ++++++++ maintenance/doMaintenance.php | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php index c219efa80d..63f9a54184 100644 --- a/includes/profiler/Profiler.php +++ b/includes/profiler/Profiler.php @@ -94,6 +94,14 @@ class Profiler { return self::$__instance; } + /** + * Set the profiler to a specific profiler instance. Mostly for dumpHTML + * @param $p Profiler object + */ + public static function setInstance( Profiler $p ) { + self::$__instance = $p; + } + /** * Called by wfProfieIn() * diff --git a/maintenance/doMaintenance.php b/maintenance/doMaintenance.php index 8697e5412e..0818158df9 100644 --- a/maintenance/doMaintenance.php +++ b/maintenance/doMaintenance.php @@ -67,6 +67,7 @@ if ( $r ) { # Get the MWInit class if ( !defined( 'MW_COMPILED' ) ) { require_once( "$IP/includes/Init.php" ); + require_once( "$IP/includes/AutoLoader.php" ); } # Stub the profiler @@ -74,7 +75,6 @@ require_once( MWInit::compiledPath( 'includes/profiler/Profiler.php' ) ); // Some other requires if ( !defined( 'MW_COMPILED' ) ) { - require_once( "$IP/includes/AutoLoader.php" ); require_once( "$IP/includes/Defines.php" ); } require_once( "$IP/includes/DefaultSettings.php" ); -- 2.20.1