r61848 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r61847‎ | r61848 | r61849 >
Date:08:58, 2 February 2010
Author:aaron
Status:ok
Tags:
Comment:
Fixed case where a pointless margin would show up after the stable rev
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php
@@ -1740,23 +1740,26 @@
17411741 if ( !isset( $history->fr_stableRevId ) ) {
17421742 $frev = $fa->getStableRev();
17431743 $history->fr_stableRevId = $frev ? $frev->getRevId() : 0;
 1744+ $history->fr_pendingRevs = false;
17441745 }
17451746 if ( !$history->fr_stableRevId ) {
17461747 return true; // nothing to do here
17471748 }
 1749+ $revId = (int)$row->rev_id;
17481750 // Unreviewed revision: highlight if pending
17491751 $link = $class = '';
17501752 if ( !isset( $row->fr_quality ) ) {
1751 - if ( $row->rev_id > $history->fr_stableRevId ) {
 1753+ if ( $revId > $history->fr_stableRevId ) {
17521754 $class = 'flaggedrevs-unreviewed';
17531755 $link = '<strong>' . wfMsgHtml( 'revreview-hist-pending' ) . '</strong>';
 1756+ $history->fr_pendingRevs = true; // pending rev shown above stable
17541757 }
17551758 // Reviewed revision: highlight and add link
17561759 } else if ( !( $row->rev_deleted & Revision::DELETED_TEXT ) ) {
17571760 # Add link to stable version of *this* rev, if any
17581761 list( $link, $class ) = self::markHistoryRow( $title, $row );
17591762 # Space out and demark the stable revision
1760 - if ( $row->rev_id == $history->fr_stableRevId ) {
 1763+ if ( $revId == $history->fr_stableRevId && $history->fr_pendingRevs ) {
17611764 $liClasses[] = 'flaggedrevs_hist_stable';
17621765 }
17631766 }

Status & tagging log