r112650 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112649‎ | r112650 | r112651 >
Date:22:50, 28 February 2012
Author:aaron
Status:ok
Tags:
Comment:
live hack to fix bug with rc_patrolled sometimes not getting set
Modified paths:
  • /branches/wmf/1.19wmf1/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.19wmf1/extensions/FlaggedRevs/backend/FlaggedRevs.hooks.php
@@ -605,10 +605,11 @@
606606 // Is the page reviewable?
607607 if ( $fa->isReviewable() ) {
608608 $revId = $rc->mAttribs['rc_this_oldid'];
609 - $quality = FlaggedRevision::getRevQuality( $revId, FR_MASTER );
 609+ // If the edit we just made was reviewed, then it's the stable rev
 610+ $frev = FlaggedRevision::newFromTitle( $rc->getTitle(), $revId, FR_MASTER );
610611 // Reviewed => patrolled
611 - if ( $quality !== false && $quality >= FR_CHECKED ) {
612 - RevisionReviewForm::updateRecentChanges( $rc, 'patrol', $fa->getStableRev() );
 612+ if ( $frev ) {
 613+ RevisionReviewForm::updateRecentChanges( $rc, 'patrol', $frev );
613614 $rc->mAttribs['rc_patrolled'] = 1; // make sure irc/email notifs know status
614615 }
615616 return true;

Follow-up revisions

RevisionCommit summaryAuthorDate
r112653(bug 34775) Ported r112650 from 1.19wmf. This both avoids an extra and avoids...aaron22:54, 28 February 2012

Status & tagging log