http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89241

Revision: 89241
Author:   tstarling
Date:     2011-05-31 23:50:11 +0000 (Tue, 31 May 2011)
Log Message:
-----------
Fix for r89206, r89218: always supply constructor parameters

Modified Paths:
--------------
    trunk/phase3/includes/profiler/Profiler.php
    trunk/phase3/includes/profiler/ProfilerSimple.php
    trunk/phase3/includes/profiler/ProfilerSimpleText.php
    trunk/phase3/includes/profiler/ProfilerSimpleTrace.php

Modified: trunk/phase3/includes/profiler/Profiler.php
===================================================================
--- trunk/phase3/includes/profiler/Profiler.php 2011-05-31 22:56:52 UTC (rev 
89240)
+++ trunk/phase3/includes/profiler/Profiler.php 2011-05-31 23:50:11 UTC (rev 
89241)
@@ -42,7 +42,7 @@
        protected $mProfileID = false;
        private static $__instance = null;
 
-       function __construct( $params = null ) {
+       function __construct( $params ) {
                // Push an entry for the pre-profile setup time onto the stack
                global $wgRequestTime;
                if ( !empty( $wgRequestTime ) ) {
@@ -69,7 +69,7 @@
                        } elseif( $wgProfiler instanceof Profiler ) {
                                self::$__instance = $wgProfiler; // back-compat
                        } else {
-                               self::$__instance = new ProfilerStub;
+                               self::$__instance = new ProfilerStub( 
$wgProfiler );
                        }
                }
                return self::$__instance;

Modified: trunk/phase3/includes/profiler/ProfilerSimple.php
===================================================================
--- trunk/phase3/includes/profiler/ProfilerSimple.php   2011-05-31 22:56:52 UTC 
(rev 89240)
+++ trunk/phase3/includes/profiler/ProfilerSimple.php   2011-05-31 23:50:11 UTC 
(rev 89241)
@@ -12,8 +12,9 @@
 class ProfilerSimple extends Profiler {
        var $mMinimumTime = 0;
 
-       function __construct() {
+       function __construct( $params ) {
                global $wgRequestTime, $wgRUstart;
+               parent::__construct( $params );
                if (!empty($wgRequestTime) && !empty($wgRUstart)) {
                        $this->mWorkStack[] = array( '-total', 0, 
$wgRequestTime,$this->getCpuTime($wgRUstart));
 

Modified: trunk/phase3/includes/profiler/ProfilerSimpleText.php
===================================================================
--- trunk/phase3/includes/profiler/ProfilerSimpleText.php       2011-05-31 
22:56:52 UTC (rev 89240)
+++ trunk/phase3/includes/profiler/ProfilerSimpleText.php       2011-05-31 
23:50:11 UTC (rev 89241)
@@ -22,7 +22,7 @@
                if( isset( $profileConfig['visible'] ) && 
$profileConfig['visible'] ) {
                        $this->visible = true;
                }
-               parent::__construct();
+               parent::__construct( $profileConfig );
        }
 
        public function logData() {

Modified: trunk/phase3/includes/profiler/ProfilerSimpleTrace.php
===================================================================
--- trunk/phase3/includes/profiler/ProfilerSimpleTrace.php      2011-05-31 
22:56:52 UTC (rev 89240)
+++ trunk/phase3/includes/profiler/ProfilerSimpleTrace.php      2011-05-31 
23:50:11 UTC (rev 89241)
@@ -14,8 +14,9 @@
        var $trace = "";
        var $memory = 0;
 
-       function __construct() {
+       function __construct( $params ) {
                global $wgRequestTime, $wgRUstart;
+               parent::__construct( $params );
                if ( !empty( $wgRequestTime ) && !empty( $wgRUstart ) ) {
                        $this->mWorkStack[] = array( '-total', 0, 
$wgRequestTime, $this->getCpuTime( $wgRUstart ) );
                }


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to