Index: trunk/phase3/StartProfiler.php |
— | — | @@ -1,22 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); |
5 | | - |
6 | | -/** |
7 | | - * To use a profiler, delete the line above and add something like this: |
8 | | - * |
9 | | - * require_once( dirname(__FILE__).'/includes/Profiler.php' ); |
10 | | - * $wgProfiler = new Profiler; |
11 | | - * |
12 | | - * Or for a sampling profiler: |
13 | | - * if ( !mt_rand( 0, 100 ) ) { |
14 | | - * require_once( dirname(__FILE__).'/includes/Profiler.php' ); |
15 | | - * $wgProfiler = new Profiler; |
16 | | - * } else { |
17 | | - * require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); |
18 | | - * } |
19 | | - * |
20 | | - * Configuration of the profiler output can be done in LocalSettings.php |
21 | | - */ |
22 | | - |
23 | | - |
Index: trunk/phase3/StartProfiler.sample |
— | — | @@ -0,0 +1,23 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); |
| 5 | + |
| 6 | +/** |
| 7 | + * To use a profiler, copy this file to StartProfiler.php, |
| 8 | + * delete the PHP line above, and add something like this: |
| 9 | + * |
| 10 | + * require_once( dirname(__FILE__).'/includes/Profiler.php' ); |
| 11 | + * $wgProfiler = new Profiler; |
| 12 | + * |
| 13 | + * Or for a sampling profiler: |
| 14 | + * if ( !mt_rand( 0, 100 ) ) { |
| 15 | + * require_once( dirname(__FILE__).'/includes/Profiler.php' ); |
| 16 | + * $wgProfiler = new Profiler; |
| 17 | + * } else { |
| 18 | + * require_once( dirname(__FILE__).'/includes/ProfilerStub.php' ); |
| 19 | + * } |
| 20 | + * |
| 21 | + * Configuration of the profiler output can be done in LocalSettings.php |
| 22 | + */ |
| 23 | + |
| 24 | + |
Property changes on: trunk/phase3/StartProfiler.sample |
___________________________________________________________________ |
Name: svn:eol-style |
1 | 25 | + native |
Index: trunk/phase3/includes/WebStart.php |
— | — | @@ -65,7 +65,11 @@ |
66 | 66 | |
67 | 67 | |
68 | 68 | # Start profiler |
69 | | -require_once( "$IP/StartProfiler.php" ); |
| 69 | +if( file_exists("$IP/StartProfiler.php") ) { |
| 70 | + require_once( "$IP/StartProfiler.php" ); |
| 71 | +} else { |
| 72 | + require_once( "$IP/includes/ProfilerStub.php" ); |
| 73 | +} |
70 | 74 | wfProfileIn( 'WebStart.php-conf' ); |
71 | 75 | |
72 | 76 | # Load up some global defines. |
Property changes on: trunk/phase3 |
___________________________________________________________________ |
Name: svn:ignore |
73 | 77 | - LocalSettings.php |
AdminSettings.php |
StartProfiler.php |
favicon.ico |
*~ |
.classpath |
.project |
project.index |
.metadata* |
.settings |
static* |
74 | 78 | + *~ |
.classpath |
.metadata* |
.project |
.settings |
AdminSettings.php |
LocalSettings.php |
StartProfiler.php |
favicon.ico |
project.index |
static* |