Index: trunk/extensions/FlaggedRevs/FlaggedArticle.php |
— | — | @@ -101,13 +101,22 @@ |
102 | 102 | } |
103 | 103 | |
104 | 104 | /** |
105 | | - * Is this user shown the stable version by default for this page? |
| 105 | + * Is the stable version shown by default for this page? |
106 | 106 | */ |
107 | 107 | public function showStableByDefault() { |
108 | 108 | # Get page configuration |
109 | 109 | $config = $this->getVisibilitySettings(); |
110 | 110 | return (bool)$config['override']; |
111 | 111 | } |
| 112 | + |
| 113 | + /** |
| 114 | + * Is this user shown the stable version by default for this page? |
| 115 | + */ |
| 116 | + public function showStableByDefaultUser() { |
| 117 | + # Get page configuration |
| 118 | + $config = $this->getVisibilitySettings(); |
| 119 | + return ( $config['override'] && !FlaggedRevs::ignoreDefaultVersion() ); |
| 120 | + } |
112 | 121 | |
113 | 122 | /** |
114 | 123 | * Is this page less open than the site defaults? |
— | — | @@ -572,6 +581,9 @@ |
573 | 582 | $wgOut->addHTML( $tag . $warning ); |
574 | 583 | |
575 | 584 | # Show diff to stable, to make things less confusing. |
| 585 | + if( !$this->showStableByDefaultUser() && !$wgUser->isAllowed('review') ) { |
| 586 | + return true; |
| 587 | + } |
576 | 588 | if( $frev->getRevId() == $revId ) |
577 | 589 | return true; // nothing to show here |
578 | 590 | # Don't show for old revisions, diff, preview, or undo. |