From 248c17383dec00ce2910f42751c1b7b81564da9a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 7 May 2009 18:30:26 +0000 Subject: [PATCH] Removed StartProfiler.php from SVN control and added StartProfiler.sample file. The sample file can be moved to the former name to set profiling. MW will fall back to ProfilerStub.php as usual if there is no StartProfiler.php. --- StartProfiler.php => StartProfiler.sample | 3 ++- includes/WebStart.php | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) rename StartProfiler.php => StartProfiler.sample (81%) diff --git a/StartProfiler.php b/StartProfiler.sample similarity index 81% rename from StartProfiler.php rename to StartProfiler.sample index 3fcf69e6e5..f91aeb9281 100644 --- a/StartProfiler.php +++ b/StartProfiler.sample @@ -3,7 +3,8 @@ require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); /** - * To use a profiler, delete the line above and add something like this: + * To use a profiler, copy this file to StartProfiler.php, + * delete the PHP line above, and add something like this: * * require_once( dirname(__FILE__).'/includes/Profiler.php' ); * $wgProfiler = new Profiler; diff --git a/includes/WebStart.php b/includes/WebStart.php index ffef7be5b1..d62b4a628c 100644 --- a/includes/WebStart.php +++ b/includes/WebStart.php @@ -65,7 +65,11 @@ if ( $IP === false ) { # Start profiler -require_once( "$IP/StartProfiler.php" ); +if( file_exists("$IP/StartProfiler.php") ) { + require_once( "$IP/StartProfiler.php" ); +} else { + require_once( "$IP/includes/ProfilerStub.php" ); +} wfProfileIn( 'WebStart.php-conf' ); # Load up some global defines. -- 2.20.1