From: Brion Vibber Date: Thu, 5 Oct 2006 21:20:23 +0000 (+0000) Subject: Revert to previous version using $wgDBname instead of wfWikiID(); functions X-Git-Tag: 1.31.0-rc.0~55614 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=3cf67f52a443f91d46f217e7151389f093d2f6ac;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/ProfilerStub.php b/includes/ProfilerStub.php index b4f8caf23b..4cf0aa4494 100644 --- a/includes/ProfilerStub.php +++ b/includes/ProfilerStub.php @@ -4,20 +4,20 @@ $haveProctitle=function_exists("setproctitle"); function wfProfileIn( $fn = '' ) { - global $hackwhere, $haveProctitle; + global $hackwhere, $wgDBname, $haveProctitle; if ($haveProctitle) { $hackwhere[] = $fn; - setproctitle($fn . ' ['.wfWikiID().']'); + setproctitle($fn . " [$wgDBname]"); } } function wfProfileOut( $fn = '' ) { - global $hackwhere, $haveProctitle; + global $hackwhere, $wgDBname, $haveProctitle; if (!$haveProctitle) return; if (count($hackwhere)) array_pop($hackwhere); if (count($hackwhere)) - setproctitle($hackwhere[count($hackwhere)-1] . ' ['.wfWikiID().']'); + setproctitle($hackwhere[count($hackwhere)-1] . " [$wgDBname]"); } function wfGetProfilingOutput( $s, $e ) {} function wfProfileClose() {}