dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f5f020c
)
Fix for r89206, r89218: always supply constructor parameters
author
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 31 May 2011 23:50:11 +0000
(23:50 +0000)
committer
Tim Starling
<tstarling@users.mediawiki.org>
Tue, 31 May 2011 23:50:11 +0000
(23:50 +0000)
includes/profiler/Profiler.php
patch
|
blob
|
history
includes/profiler/ProfilerSimple.php
patch
|
blob
|
history
includes/profiler/ProfilerSimpleText.php
patch
|
blob
|
history
includes/profiler/ProfilerSimpleTrace.php
patch
|
blob
|
history
diff --git
a/includes/profiler/Profiler.php
b/includes/profiler/Profiler.php
index
1358828
..
78ea912
100644
(file)
--- a/
includes/profiler/Profiler.php
+++ b/
includes/profiler/Profiler.php
@@
-42,7
+42,7
@@
class Profiler {
protected $mProfileID = false;
private static $__instance = null;
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 ) ) {
// Push an entry for the pre-profile setup time onto the stack
global $wgRequestTime;
if ( !empty( $wgRequestTime ) ) {
@@
-69,7
+69,7
@@
class Profiler {
} elseif( $wgProfiler instanceof Profiler ) {
self::$__instance = $wgProfiler; // back-compat
} else {
} elseif( $wgProfiler instanceof Profiler ) {
self::$__instance = $wgProfiler; // back-compat
} else {
- self::$__instance = new ProfilerStub;
+ self::$__instance = new ProfilerStub
( $wgProfiler )
;
}
}
return self::$__instance;
}
}
return self::$__instance;
diff --git
a/includes/profiler/ProfilerSimple.php
b/includes/profiler/ProfilerSimple.php
index
8f1c621
..
2bfc5e0
100644
(file)
--- a/
includes/profiler/ProfilerSimple.php
+++ b/
includes/profiler/ProfilerSimple.php
@@
-12,8
+12,9
@@
class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
class ProfilerSimple extends Profiler {
var $mMinimumTime = 0;
- function __construct() {
+ function __construct(
$params
) {
global $wgRequestTime, $wgRUstart;
global $wgRequestTime, $wgRUstart;
+ parent::__construct( $params );
if (!empty($wgRequestTime) && !empty($wgRUstart)) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart));
if (!empty($wgRequestTime) && !empty($wgRUstart)) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime,$this->getCpuTime($wgRUstart));
diff --git
a/includes/profiler/ProfilerSimpleText.php
b/includes/profiler/ProfilerSimpleText.php
index
fccfb92
..
49ad02b
100644
(file)
--- a/
includes/profiler/ProfilerSimpleText.php
+++ b/
includes/profiler/ProfilerSimpleText.php
@@
-22,7
+22,7
@@
class ProfilerSimpleText extends ProfilerSimple {
if( isset( $profileConfig['visible'] ) && $profileConfig['visible'] ) {
$this->visible = true;
}
if( isset( $profileConfig['visible'] ) && $profileConfig['visible'] ) {
$this->visible = true;
}
- parent::__construct();
+ parent::__construct(
$profileConfig
);
}
public function logData() {
}
public function logData() {
diff --git
a/includes/profiler/ProfilerSimpleTrace.php
b/includes/profiler/ProfilerSimpleTrace.php
index
1e0d204
..
ba41bab
100644
(file)
--- a/
includes/profiler/ProfilerSimpleTrace.php
+++ b/
includes/profiler/ProfilerSimpleTrace.php
@@
-14,8
+14,9
@@
class ProfilerSimpleTrace extends ProfilerSimple {
var $trace = "";
var $memory = 0;
var $trace = "";
var $memory = 0;
- function __construct() {
+ function __construct(
$params
) {
global $wgRequestTime, $wgRUstart;
global $wgRequestTime, $wgRUstart;
+ parent::__construct( $params );
if ( !empty( $wgRequestTime ) && !empty( $wgRUstart ) ) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime, $this->getCpuTime( $wgRUstart ) );
}
if ( !empty( $wgRequestTime ) && !empty( $wgRUstart ) ) {
$this->mWorkStack[] = array( '-total', 0, $wgRequestTime, $this->getCpuTime( $wgRUstart ) );
}