r44884 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44883‎ | r44884 | r44885 >
Date:22:13, 21 December 2008
Author:aaron
Status:deferred
Tags:
Comment:
Fix for r44883
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php
@@ -801,14 +801,16 @@
802802
803803 public static function updateRecentChanges( $title, $revId, $rcId=false, $patrol=true ) {
804804 wfProfileIn( __METHOD__ );
 805+ $revId = intval($revId);
805806 $dbw = wfGetDB( DB_MASTER );
806807 # Olders edits be marked as patrolled now...
807808 $dbw->update( 'recentchanges',
808809 array( 'rc_patrolled' => $patrol ? 1 : 0 ),
809810 array( 'rc_namespace' => $title->getNamespace(),
810811 'rc_title' => $title->getDBKey(),
811 - 'rc_this_oldid <= ' . intval($revId) ),
 812+ $patrol ? "rc_this_oldid <= $revId" : "rc_this_oldid = $revId" ),
812813 __METHOD__,
 814+ // Performance
813815 array( 'USE INDEX' => 'rc_namespace_title', 'LIMIT' => 50 )
814816 );
815817 # New page patrol may be enabled. If so, the rc_id may be the first

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r44883Update RC on unreviewaaron21:51, 21 December 2008

Status & tagging log