protected static function getDiffRevMsgAndClass(Revision $rev, FlaggedRevision $srev = null)
 {
     $tier = FlaggedRevision::getRevQuality($rev->getId());
     if ($tier !== false) {
         $msg = $tier ? 'revreview-hist-quality' : 'revreview-hist-basic';
     } else {
         $msg = $srev && $rev->getTimestamp() > $srev->getRevTimestamp() ? 'revreview-hist-pending' : 'revreview-hist-draft';
     }
     $css = FlaggedRevsXML::getQualityColor($tier);
     return array($msg, $css);
 }
 /**
  * When an edit is made to a page:
  * (a) If the page is reviewable, silently mark the edit patrolled if it was auto-reviewed
  * (b) If the page can be patrolled, auto-patrol the edit patrolled as normal
  * (c) If the page is new and $wgUseNPPatrol is on, auto-patrol the edit patrolled as normal
  * (d) If the edit is neither reviewable nor patrolleable, silently mark it patrolled
  */
 public static function autoMarkPatrolled(RecentChange &$rc)
 {
     if (empty($rc->mAttribs['rc_this_oldid'])) {
         return true;
     }
     $fa = FlaggableWikiPage::getTitleInstance($rc->getTitle());
     $fa->loadPageData('fromdbmaster');
     // Is the page reviewable?
     if ($fa->isReviewable()) {
         $revId = $rc->mAttribs['rc_this_oldid'];
         $quality = FlaggedRevision::getRevQuality($revId, FR_MASTER);
         // Reviewed => patrolled
         if ($quality !== false && $quality >= FR_CHECKED) {
             RevisionReviewForm::updateRecentChanges($rc, 'patrol', $fa->getStableRev());
             $rc->mAttribs['rc_patrolled'] = 1;
             // make sure irc/email notifs know status
         }
         return true;
     }
     return true;
 }