r53492 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53491‎ | r53492 | r53493 >
Date:20:21, 19 July 2009
Author:brion
Status:ok
Tags:
Comment:
* (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1
Patch by GreenReaper: http://bug-attachment.wikimedia.org/attachment.cgi?id=6246
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/Setup.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Setup.php
@@ -327,12 +327,16 @@
328328 # any necessary initialisation in the fully initialised environment
329329 foreach ( $wgExtensionFunctions as $func ) {
330330 # Allow closures in PHP 5.3+
331 - if ( is_object( $func ) && $func instanceof Closure )
 331+ if ( is_object( $func ) && $func instanceof Closure ) {
332332 $profName = $fname.'-extensions-closure';
333 - elseif( is_array( $func ) )
334 - $profName = $fname.'-extensions-'.implode( '::', $func );
335 - else
 333+ } elseif( is_array( $func ) ) {
 334+ if ( is_object( $func[0] ) )
 335+ $profName = $fname.'-extensions-'.get_class( $func[0] ).'::'.$func[1];
 336+ else
 337+ $profName = $fname.'-extensions-'.implode( '::', $func );
 338+ } else {
336339 $profName = $fname.'-extensions-'.strval( $func );
 340+ }
337341
338342 wfProfileIn( $profName );
339343 call_user_func( $func );
Index: trunk/phase3/RELEASE-NOTES
@@ -296,6 +296,7 @@
297297 * (bug 19355) Added .xhtml, .xht to upload file extension blacklist
298298 * (bug 19287) Workaround for lag on history page in Firefox 3.5
299299 * (bug 19564) Updated docs/hooks.txt
 300+* (bug 18751) Fix for buggage in profiling setup for some extensions on PHP 5.1
300301
301302 == API changes in 1.16 ==
302303

Status & tagging log