Index: trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php |
— | — | @@ -15,13 +15,17 @@ |
16 | 16 | } |
17 | 17 | |
18 | 18 | public function execute( $par ) { |
19 | | - global $wgUser, $wgOut, $wgRequest; |
| 19 | + global $wgUser, $wgOut, $wgRequest, $wgArticleFeedbackDashboard; |
20 | 20 | |
21 | 21 | $wgOut->addModules( 'ext.articleFeedback.dashboard' ); |
22 | 22 | $this->setHeaders(); |
23 | | - $this->renderDailyHighsAndLows(); |
24 | | - $this->renderWeeklyMostChanged(); |
25 | | - $this->renderRecentLows(); |
| 23 | + if ( $wgArticleFeedbackDashboard ) { |
| 24 | + $this->renderDailyHighsAndLows(); |
| 25 | + $this->renderWeeklyMostChanged(); |
| 26 | + $this->renderRecentLows(); |
| 27 | + } else { |
| 28 | + $wgOut->addWikiText( 'This page has been disabled.' ); |
| 29 | + } |
26 | 30 | } |
27 | 31 | |
28 | 32 | /* Protected Methods */ |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php |
— | — | @@ -139,8 +139,6 @@ |
140 | 140 | $wgAPIListModules['articlefeedback'] = 'ApiQueryArticleFeedback'; |
141 | 141 | $wgAPIModules['articlefeedback'] = 'ApiArticleFeedback'; |
142 | 142 | |
143 | | -if ( $wgArticleFeedbackDashboard ) { |
144 | | - // Special Page |
145 | | - $wgSpecialPages['ArticleFeedback'] = 'SpecialArticleFeedback'; |
146 | | - $wgSpecialPageGroups['ArticleFeedback'] = 'other'; |
147 | | -} |
\ No newline at end of file |
| 143 | +// Special Page |
| 144 | +$wgSpecialPages['ArticleFeedback'] = 'SpecialArticleFeedback'; |
| 145 | +$wgSpecialPageGroups['ArticleFeedback'] = 'other'; |