Followup r86228 (profiling cleanup):
authorChad Horohoe <demon@users.mediawiki.org>
Sat, 16 Apr 2011 19:23:45 +0000 (19:23 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Sat, 16 Apr 2011 19:23:45 +0000 (19:23 +0000)
* Move autoloader up in Maintenance as well
* Add setInstance() method to Profiler, dumpHTML will need it

includes/profiler/Profiler.php
maintenance/doMaintenance.php

index c219efa..63f9a54 100644 (file)
@@ -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()
         *
index 8697e54..0818158 100644 (file)
@@ -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" );