Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -898,7 +898,7 @@ |
899 | 899 | * @param Article $article |
900 | 900 | * @param Revision $rev, the new stable version |
901 | 901 | * @param mixed $latest, the latest rev ID (optional) |
902 | | - * Updates the flaggedpages fields |
| 902 | + * Updates the flaggedpages fields. Called on edit. |
903 | 903 | */ |
904 | 904 | public static function updateStableVersion( $article, $rev, $latest = NULL ) { |
905 | 905 | if( !$article->getId() ) |
— | — | @@ -943,6 +943,8 @@ |
944 | 944 | 'fp_pending_since' => $nextTimestamp ? $dbw->timestamp($nextTimestamp) : null ), |
945 | 945 | __METHOD__ |
946 | 946 | ); |
| 947 | + # Reset cache of # of unreviewed revs |
| 948 | + self::getRevCountSince( $article, $revId, true ); |
947 | 949 | # Alter pending edit tracking table |
948 | 950 | self::updatePendingList( $article, $latest ); |
949 | 951 | return true; |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -305,6 +305,8 @@ |
306 | 306 | $this->maybeShowTopDiff( $srev, $quality ); // user may want diff (via prefs) |
307 | 307 | } |
308 | 308 | $pending = ''; |
| 309 | + # If they are synced, do special styling |
| 310 | + $simpleTag = !$synced; |
309 | 311 | # Give notice to newer users if an unreviewed edit was completed... |
310 | 312 | if( !$synced && $wgRequest->getVal('shownotice') && !$wgUser->isAllowed('review') ) { |
311 | 313 | $revsSince = FlaggedRevs::getRevCountSince( $this->article, $srev->getRevId() ); |
— | — | @@ -314,12 +316,10 @@ |
315 | 317 | $pending = "<div id='mw-reviewnotice' class='flaggedrevs_preview plainlinks'>$pending</div>"; |
316 | 318 | # Notice should always use subtitle |
317 | 319 | $this->reviewNotice = $pending; |
318 | | - } |
319 | | - # If they are synced, do special styling |
320 | | - $simpleTag = !$synced; |
321 | 320 | # Construct some tagging for non-printable outputs. Note that the pending |
322 | 321 | # notice has all this info already, so don't do this if we added that already. |
323 | | - if( !$wgOut->isPrintable() && !$pending && !($this->article->lowProfileUI() && $synced) ) { |
| 322 | + # Also, if low profile UI is enabled and the page is synced, skip the tag. |
| 323 | + } else if( !$wgOut->isPrintable() && !($this->article->lowProfileUI() && $synced) ) { |
324 | 324 | $revsSince = FlaggedRevs::getRevCountSince( $this->article, $srev->getRevId() ); |
325 | 325 | $class = 'fr-icon-current'; // default |
326 | 326 | $tooltip = 'revreview-draft-title'; |