wiki.techinc.nl/includes/ProfilerStub.php
Brion Vibber 3cf67f52a4 Revert to previous version using $wgDBname instead of wfWikiID(); functions
are called at times that wfWikiID() is not defined, causing fatal errors
when profiling is enabled
2006-10-05 21:20:23 +00:00

26 lines
607 B
PHP

<?php
# Stub profiling functions
$haveProctitle=function_exists("setproctitle");
function wfProfileIn( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
if ($haveProctitle) {
$hackwhere[] = $fn;
setproctitle($fn . " [$wgDBname]");
}
}
function wfProfileOut( $fn = '' ) {
global $hackwhere, $wgDBname, $haveProctitle;
if (!$haveProctitle)
return;
if (count($hackwhere))
array_pop($hackwhere);
if (count($hackwhere))
setproctitle($hackwhere[count($hackwhere)-1] . " [$wgDBname]");
}
function wfGetProfilingOutput( $s, $e ) {}
function wfProfileClose() {}
$wgProfiling = false;
?>