r16816 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r16815‎ | r16816 | r16817 >
Date:21:20, 5 October 2006
Author:brion
Status:old
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/ProfilerStub.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ProfilerStub.php
@@ -4,20 +4,20 @@
55
66 $haveProctitle=function_exists("setproctitle");
77 function wfProfileIn( $fn = '' ) {
8 - global $hackwhere, $haveProctitle;
 8+ global $hackwhere, $wgDBname, $haveProctitle;
99 if ($haveProctitle) {
1010 $hackwhere[] = $fn;
11 - setproctitle($fn . ' ['.wfWikiID().']');
 11+ setproctitle($fn . " [$wgDBname]");
1212 }
1313 }
1414 function wfProfileOut( $fn = '' ) {
15 - global $hackwhere, $haveProctitle;
 15+ global $hackwhere, $wgDBname, $haveProctitle;
1616 if (!$haveProctitle)
1717 return;
1818 if (count($hackwhere))
1919 array_pop($hackwhere);
2020 if (count($hackwhere))
21 - setproctitle($hackwhere[count($hackwhere)-1] . ' ['.wfWikiID().']');
 21+ setproctitle($hackwhere[count($hackwhere)-1] . " [$wgDBname]");
2222 }
2323 function wfGetProfilingOutput( $s, $e ) {}
2424 function wfProfileClose() {}