Removed StartProfiler.php from SVN control and added StartProfiler.sample file. The...
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 7 May 2009 18:30:26 +0000 (18:30 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 7 May 2009 18:30:26 +0000 (18:30 +0000)
StartProfiler.php [deleted file]
StartProfiler.sample [new file with mode: 0644]
includes/WebStart.php

diff --git a/StartProfiler.php b/StartProfiler.php
deleted file mode 100644 (file)
index 3fcf69e..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<?php
-
-require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
-
-/**
- * To use a profiler, delete the line above and add something like this:
- *
- *   require_once(  dirname(__FILE__).'/includes/Profiler.php' );
- *   $wgProfiler = new Profiler;
- *
- * Or for a sampling profiler:
- *   if ( !mt_rand( 0, 100 ) ) {
- *       require_once(  dirname(__FILE__).'/includes/Profiler.php' );
- *       $wgProfiler = new Profiler;
- *   } else {
- *       require_once(  dirname(__FILE__).'/includes/ProfilerStub.php' );
- *   }
- * 
- * Configuration of the profiler output can be done in LocalSettings.php
- */
-
-
diff --git a/StartProfiler.sample b/StartProfiler.sample
new file mode 100644 (file)
index 0000000..f91aeb9
--- /dev/null
@@ -0,0 +1,23 @@
+<?php
+
+require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
+
+/**
+ * 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;
+ *
+ * Or for a sampling profiler:
+ *   if ( !mt_rand( 0, 100 ) ) {
+ *       require_once(  dirname(__FILE__).'/includes/Profiler.php' );
+ *       $wgProfiler = new Profiler;
+ *   } else {
+ *       require_once(  dirname(__FILE__).'/includes/ProfilerStub.php' );
+ *   }
+ * 
+ * Configuration of the profiler output can be done in LocalSettings.php
+ */
+
+
index ffef7be..d62b4a6 100644 (file)
@@ -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.