Don't allow double logging of patrol events
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 25 Feb 2008 05:58:10 +0000 (05:58 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 25 Feb 2008 05:58:10 +0000 (05:58 +0000)
includes/RecentChange.php

index 750404a..4c8fe1b 100644 (file)
@@ -238,6 +238,7 @@ class RecentChange
         * Mark a given change as patrolled
         *
         * @param mixed $change RecentChange or corresponding rc_id
+        * @returns integer number of affected rows
         */
        public static function markPatrolled( $change ) {
                $rcid = $change instanceof RecentChange
@@ -254,6 +255,7 @@ class RecentChange
                        ),
                        __METHOD__
                );
+               return $dbw->affectedRows();
        }
 
        # Makes an entry in the database corresponding to an edit