Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -1740,23 +1740,26 @@ |
1741 | 1741 | if ( !isset( $history->fr_stableRevId ) ) { |
1742 | 1742 | $frev = $fa->getStableRev(); |
1743 | 1743 | $history->fr_stableRevId = $frev ? $frev->getRevId() : 0; |
| 1744 | + $history->fr_pendingRevs = false; |
1744 | 1745 | } |
1745 | 1746 | if ( !$history->fr_stableRevId ) { |
1746 | 1747 | return true; // nothing to do here |
1747 | 1748 | } |
| 1749 | + $revId = (int)$row->rev_id; |
1748 | 1750 | // Unreviewed revision: highlight if pending |
1749 | 1751 | $link = $class = ''; |
1750 | 1752 | if ( !isset( $row->fr_quality ) ) { |
1751 | | - if ( $row->rev_id > $history->fr_stableRevId ) { |
| 1753 | + if ( $revId > $history->fr_stableRevId ) { |
1752 | 1754 | $class = 'flaggedrevs-unreviewed'; |
1753 | 1755 | $link = '<strong>' . wfMsgHtml( 'revreview-hist-pending' ) . '</strong>'; |
| 1756 | + $history->fr_pendingRevs = true; // pending rev shown above stable |
1754 | 1757 | } |
1755 | 1758 | // Reviewed revision: highlight and add link |
1756 | 1759 | } else if ( !( $row->rev_deleted & Revision::DELETED_TEXT ) ) { |
1757 | 1760 | # Add link to stable version of *this* rev, if any |
1758 | 1761 | list( $link, $class ) = self::markHistoryRow( $title, $row ); |
1759 | 1762 | # Space out and demark the stable revision |
1760 | | - if ( $row->rev_id == $history->fr_stableRevId ) { |
| 1763 | + if ( $revId == $history->fr_stableRevId && $history->fr_pendingRevs ) { |
1761 | 1764 | $liClasses[] = 'flaggedrevs_hist_stable'; |
1762 | 1765 | } |
1763 | 1766 | } |