Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -385,8 +385,10 @@ |
386 | 386 | $quality = FlaggedRevs::isQuality( $flags ); |
387 | 387 | # Get stable version sync status |
388 | 388 | $synced = $this->article->stableVersionIsSynced(); |
389 | | - $this->setReviewNotes( $srev, $synced ); // Still the same |
390 | | - if ( !$synced ) { |
| 389 | + if ( $synced ) { |
| 390 | + $this->setReviewNotes( $srev ); // Still the same |
| 391 | + } else { |
| 392 | + $this->setPendingNotice( $srev ); |
391 | 393 | $this->maybeShowTopDiff( $srev, $quality ); // user may want diff (via prefs) |
392 | 394 | } |
393 | 395 | # If they are synced, do special styling |
— | — | @@ -1249,26 +1251,31 @@ |
1250 | 1252 | * @param FlaggedRevision $frev |
1251 | 1253 | * @return string, revision review notes |
1252 | 1254 | */ |
1253 | | - public function setReviewNotes( $frev, $synced = true ) { |
1254 | | - global $wgUser, $wgLang; |
| 1255 | + public function setReviewNotes( $frev ) { |
| 1256 | + global $wgUser; |
1255 | 1257 | $this->load(); |
1256 | | - |
1257 | | - if ( $synced ) { |
1258 | | - if ( $frev && FlaggedRevs::allowComments() && $frev->getComment() != '' ) { |
1259 | | - $this->reviewNotes = "<br /><div class='flaggedrevs_notes plainlinks'>"; |
1260 | | - $this->reviewNotes .= wfMsgExt( 'revreview-note', array( 'parseinline' ), |
1261 | | - User::whoIs( $frev->getUser() ) ); |
1262 | | - $this->reviewNotes .= '<br /><i>' . |
1263 | | - $wgUser->getSkin()->formatComment( $frev->getComment() ) . '</i></div>'; |
1264 | | - } |
1265 | | - } else { |
1266 | | - $time = $wgLang->date( $frev->getTimestamp(), true ); |
1267 | | - $pendingNotice = wfMsgExt( 'revreview-pendingnotice', array( 'parseinline' ), $time ); |
1268 | | - $this->reviewNotice = "<div id='mw-fr-reviewnotice' " . |
1269 | | - "class='flaggedrevs_preview plainlinks'>" . $pendingNotice . "</div>"; |
| 1258 | + if ( $frev && FlaggedRevs::allowComments() && $frev->getComment() != '' ) { |
| 1259 | + $this->reviewNotes = "<br /><div class='flaggedrevs_notes plainlinks'>"; |
| 1260 | + $this->reviewNotes .= wfMsgExt( 'revreview-note', array( 'parseinline' ), |
| 1261 | + User::whoIs( $frev->getUser() ) ); |
| 1262 | + $this->reviewNotes .= '<br /><i>' . |
| 1263 | + $wgUser->getSkin()->formatComment( $frev->getComment() ) . '</i></div>'; |
1270 | 1264 | } |
1271 | 1265 | } |
1272 | 1266 | |
| 1267 | +/** |
| 1268 | + * @param FlaggedRevision $frev |
| 1269 | + * Adds a notice saying that this is a revision that is pending review |
| 1270 | + */ |
| 1271 | + public function setPendingNotice( $frev ) { |
| 1272 | + global $wgLang; |
| 1273 | + $this->load(); |
| 1274 | + $time = $wgLang->date( $frev->getTimestamp(), true ); |
| 1275 | + $pendingNotice = wfMsgExt( 'revreview-pendingnotice', array( 'parseinline' ), $time ); |
| 1276 | + $this->reviewNotice .= "<div id='mw-fr-reviewnotice' class='flaggedrevs_preview plainlinks'>" . |
| 1277 | + $pendingNotice . "</div>"; |
| 1278 | + } |
| 1279 | + |
1273 | 1280 | |
1274 | 1281 | /** |
1275 | 1282 | * When viewing a diff: |