r112653 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112652‎ | r112653 | r112654 >
Date:22:54, 28 February 2012
Author:aaron
Status:ok (Comments)
Tags:
Comment:
(bug 34775) Ported r112650 from 1.19wmf. This both avoids an extra and avoids using FlaggableWikiPage::getStableRev(), which does not handle slave lag well.
Modified paths:
  • /trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php
@@ -599,10 +599,11 @@
600600 // Is the page reviewable?
601601 if ( $fa->isReviewable() ) {
602602 $revId = $rc->mAttribs['rc_this_oldid'];
603 - $quality = FlaggedRevision::getRevQuality( $revId, FR_MASTER );
 603+ // If the edit we just made was reviewed, then it's the stable rev
 604+ $frev = FlaggedRevision::newFromTitle( $rc->getTitle(), $revId, FR_MASTER );
604605 // Reviewed => patrolled
605 - if ( $quality !== false && $quality >= FR_CHECKED ) {
606 - RevisionReviewForm::updateRecentChanges( $rc, 'patrol', $fa->getStableRev() );
 606+ if ( $frev ) {
 607+ RevisionReviewForm::updateRecentChanges( $rc, 'patrol', $frev );
607608 $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs know status
608609 }
609610 return true;

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r112650live hack to fix bug with rc_patrolled sometimes not getting setaaron22:50, 28 February 2012

Comments

#Comment by Aaron Schulz (talk | contribs)   22:05, 16 March 2012
  • This both avoids an extra query

Status & tagging log