r35984 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r35983‎ | r35984 | r35985 >
Date:05:59, 7 June 2008
Author:aaron
Status:old
Tags:
Comment:
Record autopatrols
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1657,13 +1657,18 @@
16581658 }
16591659 if( $patrol ) {
16601660 $dbw = wfGetDB( DB_MASTER );
1661 - $dbw->update( 'recentchanges',
1662 - array( 'rc_patrolled' => 1 ),
 1661+ $rcid = $dbw->selectField( 'recentchanges',
 1662+ 'rc_id',
16631663 array( 'rc_this_oldid' => $rev->getId(),
16641664 'rc_user_text' => $rev->getRawUserText(),
16651665 'rc_timestamp' => $dbw->timestamp( $rev->getTimestamp() ) ),
16661666 __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+ }
16681673 }
16691674 return true;
16701675 }

Status & tagging log