(bug 9860) Fix bug caused by true == 'default' (don't you love PHP?). Thanks to...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:24:51 +0000 (01:24 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 10 May 2007 01:24:51 +0000 (01:24 +0000)
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.

includes/RecentChange.php

index fced434..f01d6cc 100644 (file)
@@ -280,10 +280,8 @@ class RecentChange
         * Makes an entry in the database corresponding to page creation
         * Note: the title object must be loaded with the new id using resetArticleID()
         * @todo Document parameters and return
-        * @public
-        * @static
         */
-       public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = "default",
+       public static function notifyNew( $timestamp, &$title, $minor, &$user, $comment, $bot = 'default',
          $ip='', $size = 0, $newId = 0 )
        {
                if ( !$ip ) {
@@ -292,7 +290,7 @@ class RecentChange
                                $ip = '';
                        }
                }
-               if ( $bot == 'default' ) {
+               if ( $bot === 'default' ) {
                        $bot = $user->isAllowed( 'bot' );
                }