/** backward compatibility */
$wgProfiling = false;
+$wgProfiler = null;
/** is setproctitle function available ? */
$haveProctitle = function_exists( 'setproctitle' );
*/
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]" );
+ }
}
/**