Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -110,7 +110,8 @@ |
111 | 111 | * @returns bool |
112 | 112 | */ |
113 | 113 | protected static function isViewAction( $action ) { |
114 | | - return ( $action == 'view' || $action == 'purge' || $action == 'render' || $action == 'historysubmit' ); |
| 114 | + return ( $action == 'view' || $action == 'purge' || $action == 'render' |
| 115 | + || $action == 'historysubmit' ); |
115 | 116 | } |
116 | 117 | |
117 | 118 | /** |
— | — | @@ -193,7 +194,8 @@ |
194 | 195 | if( $stableId && $reqId ) { |
195 | 196 | # Treat requesting the stable version by ID as &stable=1 |
196 | 197 | if( $reqId != $stableId ) { |
197 | | - $frev = FlaggedRevision::newFromTitle( $this->article->getTitle(), $reqId, FR_TEXT ); |
| 198 | + $frev = FlaggedRevision::newFromTitle( $this->article->getTitle(), |
| 199 | + $reqId, FR_TEXT ); |
198 | 200 | $old = true; // old reviewed version requested by ID |
199 | 201 | if( !$frev ) { |
200 | 202 | $wgOut->addWikiText( wfMsg('revreview-invalid') ); |
— | — | @@ -255,11 +257,15 @@ |
256 | 258 | $this->showOldReviewedVersion( $srev, $frev, $tag, $prot ); |
257 | 259 | $outputDone = true; # Tell MW that parser output is done |
258 | 260 | $pcache = false; |
| 261 | + // Stable version requested by ID or relevant conditions met to |
| 262 | + // to override page view. |
| 263 | + } else if( $stable || $this->pageOverride() ) { |
| 264 | + $this->showStableVersion( $srev, $tag, $prot ); |
| 265 | + $outputDone = true; # Tell MW that parser output is done |
| 266 | + $pcache = false; |
259 | 267 | // Looking at some specific old revision (&oldid=x) or if FlaggedRevs is not |
260 | | - // set to override given the relevant conditions (like &stable=0). |
261 | | - } elseif( !$stable && !$this->pageOverride() ) { |
262 | | - $this->showRegularVersion( $srev, $tag, $prot ); |
263 | | - // The relevant conditions are met to override the page with the stable version. |
| 268 | + // set to override given the relevant conditions (like &stable=0) or there |
| 269 | + // is no stable version. |
264 | 270 | } else { |
265 | 271 | $this->showStableVersion( $srev, $tag, $prot ); |
266 | 272 | $outputDone = true; # Tell MW that parser output is done |
— | — | @@ -304,7 +310,6 @@ |
305 | 311 | } else { |
306 | 312 | $this->maybeShowTopDiff( $srev, $quality ); // user may want diff (via prefs) |
307 | 313 | } |
308 | | - $pending = ''; |
309 | 314 | # If they are synced, do special styling |
310 | 315 | $simpleTag = !$synced; |
311 | 316 | # Give notice to newer users if an unreviewed edit was completed... |