r44883 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r44882‎ | r44883 | r44884 >
Date:21:51, 21 December 2008
Author:aaron
Status:deferred
Tags:
Comment:
Update RC on unreview
Modified paths:
  • /trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/specialpages/RevisionReview_body.php
@@ -608,7 +608,7 @@
609609 $dbw->begin();
610610 $flaggedRevision->insertOn( $fulltext, $tmpset, $imgset );
611611 # Update recent changes
612 - self::updateRecentChanges( $this->page, $rev->getId(), $this->rcid );
 612+ self::updateRecentChanges( $this->page, $rev->getId(), $this->rcid, true );
613613 # Update the article review log
614614 self::updateLog( $this->page, $this->dims, $this->oflags, $this->comment, $this->oldid, $oldSvId, true );
615615
@@ -686,6 +686,8 @@
687687 # Wipe versioning params
688688 $dbw->delete( 'flaggedtemplates', array( 'ft_rev_id' => $frev->getRevId() ) );
689689 $dbw->delete( 'flaggedimages', array( 'fi_rev_id' => $frev->getRevId() ) );
 690+ # Update recent changes
 691+ self::updateRecentChanges( $this->page, $frev->getRevId(), false, false );
690692
691693 # Get current stable version ID (for logging)
692694 $oldSv = FlaggedRevision::newFromStable( $this->page, FR_MASTER );
@@ -797,12 +799,12 @@
798800 return true;
799801 }
800802
801 - public static function updateRecentChanges( $title, $revId, $rcId = false ) {
 803+ public static function updateRecentChanges( $title, $revId, $rcId=false, $patrol=true ) {
802804 wfProfileIn( __METHOD__ );
803805 $dbw = wfGetDB( DB_MASTER );
804806 # Olders edits be marked as patrolled now...
805807 $dbw->update( 'recentchanges',
806 - array( 'rc_patrolled' => 1 ),
 808+ array( 'rc_patrolled' => $patrol ? 1 : 0 ),
807809 array( 'rc_namespace' => $title->getNamespace(),
808810 'rc_title' => $title->getDBKey(),
809811 'rc_this_oldid <= ' . intval($revId) ),

Follow-up revisions

RevisionCommit summaryAuthorDate
r44884Fix for r44883aaron22:13, 21 December 2008

Status & tagging log