From: Domas Mituzas Date: Tue, 3 Jan 2006 10:31:13 +0000 (+0000) Subject: allow pre-started Profiler X-Git-Tag: 1.6.0~791 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=e6a511848ab311c50b591d73d4df6440551392ce;p=lhc%2Fweb%2Fwiklou.git allow pre-started Profiler --- diff --git a/includes/ProfilerSimple.php b/includes/ProfilerSimple.php index 9269df592d..d96a755b32 100755 --- a/includes/ProfilerSimple.php +++ b/includes/ProfilerSimple.php @@ -8,6 +8,8 @@ * @todo document * @package MediaWiki */ +require_once('Profiling.php'); + class ProfilerSimple extends Profiler { function ProfilerSimple() { global $wgRequestTime,$wgRUstart; diff --git a/includes/Setup.php b/includes/Setup.php index 1fdc3f82ad..75f830f927 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -24,8 +24,11 @@ if ( !isset( $wgVersion ) ) { if( !isset( $wgProfiling ) ) $wgProfiling = false; -if ( $wgProfiling and (0 == rand() % $wgProfileSampleRate ) ) { +if ( is_object($wgProfiler) ) { + /* nada, everything should be done already */ +} elseif ( $wgProfiling and (0 == rand() % $wgProfileSampleRate ) ) { require_once( 'Profiling.php' ); + $wgProfiling = true; if ($wgProfilerType == "") { $wgProfiler = new Profiler(); } else {