Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php |
— | — | @@ -801,14 +801,16 @@ |
802 | 802 | |
803 | 803 | public static function updateRecentChanges( $title, $revId, $rcId=false, $patrol=true ) { |
804 | 804 | wfProfileIn( __METHOD__ ); |
| 805 | + $revId = intval($revId); |
805 | 806 | $dbw = wfGetDB( DB_MASTER ); |
806 | 807 | # Olders edits be marked as patrolled now... |
807 | 808 | $dbw->update( 'recentchanges', |
808 | 809 | array( 'rc_patrolled' => $patrol ? 1 : 0 ), |
809 | 810 | array( 'rc_namespace' => $title->getNamespace(), |
810 | 811 | 'rc_title' => $title->getDBKey(), |
811 | | - 'rc_this_oldid <= ' . intval($revId) ), |
| 812 | + $patrol ? "rc_this_oldid <= $revId" : "rc_this_oldid = $revId" ), |
812 | 813 | __METHOD__, |
| 814 | + // Performance |
813 | 815 | array( 'USE INDEX' => 'rc_namespace_title', 'LIMIT' => 50 ) |
814 | 816 | ); |
815 | 817 | # New page patrol may be enabled. If so, the rc_id may be the first |