r22058 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r22057‎ | r22058 | r22059 >
Date:01:24, 10 May 2007
Author:simetrical
Status:old
Tags:
Comment:
(bug 9860) Fix bug caused by true == 'default' (don't you love PHP?). Thanks to Ben White/Philip.

I'm not sure how to phrase this for RELEASE-NOTES since I'm not sure what it does exactly; does it only affect extension-writers or something? From looking at the code I can't even see how the execution path is ever even followed, except maybe from maintenance scripts.
Modified paths:
  • /trunk/phase3/includes/RecentChange.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/RecentChange.php
@@ -280,10 +280,8 @@
281281 * Makes an entry in the database corresponding to page creation
282282 * Note: the title object must be loaded with the new id using resetArticleID()
283283 * @todo Document parameters and return
284 - * @public
285 - * @static
286284 */
287 - public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = "default",
 285+ public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = 'default',
288286 $ip='', $size = 0, $newId = 0 )
289287 {
290288 if ( !$ip ) {
@@ -292,7 +290,7 @@
293291 $ip = '';
294292 }
295293 }
296 - if ( $bot == 'default' ) {
 294+ if ( $bot === 'default' ) {
297295 $bot = $user->isAllowed( 'bot' );
298296 }
299297