Index: trunk/phase3/includes/RecentChange.php |
— | — | @@ -238,6 +238,7 @@ |
239 | 239 | * Mark a given change as patrolled |
240 | 240 | * |
241 | 241 | * @param mixed $change RecentChange or corresponding rc_id |
| 242 | + * @returns integer number of affected rows |
242 | 243 | */ |
243 | 244 | public static function markPatrolled( $change ) { |
244 | 245 | $rcid = $change instanceof RecentChange |
— | — | @@ -254,6 +255,7 @@ |
255 | 256 | ), |
256 | 257 | __METHOD__ |
257 | 258 | ); |
| 259 | + return $dbw->affectedRows(); |
258 | 260 | } |
259 | 261 | |
260 | 262 | # Makes an entry in the database corresponding to an edit |
Index: trunk/extensions/FlaggedRevs/FlaggedRevsPage.php |
— | — | @@ -149,8 +149,10 @@ |
150 | 150 | function markPatrolled() { |
151 | 151 | global $wgOut; |
152 | 152 | |
153 | | - RecentChange::markPatrolled( $this->rcid ); |
154 | | - PatrolLog::record( $this->rcid ); |
| 153 | + $changed = RecentChange::markPatrolled( $this->rcid ); |
| 154 | + if( $changed ) { |
| 155 | + PatrolLog::record( $this->rcid ); |
| 156 | + } |
155 | 157 | # Inform the user |
156 | 158 | $wgOut->setPageTitle( wfMsg( 'markedaspatrolled' ) ); |
157 | 159 | $wgOut->addWikiText( wfMsgNoTrans( 'revreview-patrolled', $this->page->getPrefixedText() ) ); |