summaryrefslogtreecommitdiff
path: root/includes/ProfilerStub.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/ProfilerStub.php')
-rw-r--r--includes/ProfilerStub.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/includes/ProfilerStub.php b/includes/ProfilerStub.php
index 100cb8df..e624e6f0 100644
--- a/includes/ProfilerStub.php
+++ b/includes/ProfilerStub.php
@@ -7,6 +7,7 @@
/** backward compatibility */
$wgProfiling = false;
+$wgProfiler = null;
/** is setproctitle function available ? */
$haveProctitle = function_exists( 'setproctitle' );
@@ -29,12 +30,15 @@ function wfProfileIn( $fn = '' ) {
*/
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
- if( !$haveProctitle )
+ if( !$haveProctitle ) {
return;
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
array_pop( $hackwhere );
- if( count( $hackwhere ) )
+ }
+ if( count( $hackwhere ) ) {
setproctitle( $hackwhere[count( $hackwhere )-1] . " [$wgDBname]" );
+ }
}
/**