Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -97,6 +97,15 @@ |
98 | 98 | global $wgFlaggedRevsOverride; |
99 | 99 | return (bool)$wgFlaggedRevsOverride; |
100 | 100 | } |
| 101 | + |
| 102 | + /** |
| 103 | + * Does the review form only show for pages were the stable version is the default? |
| 104 | + * @returns bool |
| 105 | + */ |
| 106 | + public static function forDefaultVersionOnly() { |
| 107 | + global $wgFlaggedRevsReviewForDefault; |
| 108 | + return (bool)$wgFlaggedRevsReviewForDefault; |
| 109 | + } |
101 | 110 | |
102 | 111 | /** |
103 | 112 | * Should this user ignore the site and page default version settings? |
Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -131,11 +131,10 @@ |
132 | 132 | ); |
133 | 133 | if( !$row ) return null; |
134 | 134 | } else { |
135 | | - global $wgFlaggedRevsReviewForDefault; |
136 | 135 | $row = null; |
137 | 136 | # Get visiblity settings... |
138 | 137 | $config = FlaggedRevs::getPageVisibilitySettings( $title, true ); |
139 | | - if( !$config['override'] && $wgFlaggedRevsReviewForDefault ) { |
| 138 | + if( !$config['override'] && FlaggedRevs::forDefaultVersionOnly() ) { |
140 | 139 | return $row; // page is not reviewable; no stable version |
141 | 140 | } |
142 | 141 | $dbw = wfGetDB( DB_MASTER ); |