Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -1657,13 +1657,18 @@ |
1658 | 1658 | } |
1659 | 1659 | if( $patrol ) { |
1660 | 1660 | $dbw = wfGetDB( DB_MASTER ); |
1661 | | - $dbw->update( 'recentchanges', |
1662 | | - array( 'rc_patrolled' => 1 ), |
| 1661 | + $rcid = $dbw->selectField( 'recentchanges', |
| 1662 | + 'rc_id', |
1663 | 1663 | array( 'rc_this_oldid' => $rev->getId(), |
1664 | 1664 | 'rc_user_text' => $rev->getRawUserText(), |
1665 | 1665 | 'rc_timestamp' => $dbw->timestamp( $rev->getTimestamp() ) ), |
1666 | 1666 | __METHOD__, |
1667 | | - array( 'USE INDEX' => 'rc_user_text', 'LIMIT' => 1 ) ); |
| 1667 | + array( 'USE INDEX' => 'rc_user_text', 'LIMIT' => 1 ) |
| 1668 | + ); |
| 1669 | + if( $rcid ) { |
| 1670 | + RecentChange::markPatrolled( $rcid ); |
| 1671 | + PatrolLog::record( $rcid, true ); |
| 1672 | + } |
1668 | 1673 | } |
1669 | 1674 | return true; |
1670 | 1675 | } |