]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blobdiff - includes/ProfilerStub.php
MediaWiki 1.17.0
[autoinstalls/mediawiki.git] / includes / ProfilerStub.php
index 100cb8df1058519a130971fe1c7a7ad253ad964b..e624e6f019b083d5f1beed75868c9c0c74350298 100644 (file)
@@ -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]" );
+       }
 }
 
 /**