r87055 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87054‎ | r87055 | r87056 >
Date:22:58, 27 April 2011
Author:tparscal
Status:ok
Tags:
Comment:
Fixed silly mistake in adding $wgArticleFeedbackDashboard (see r87023) - now disabling the page just prevents anything from being rendered, and outputs a message explaining the page is disabled.
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.php (modified) (history)
  • /trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/SpecialArticleFeedback.php
@@ -15,13 +15,17 @@
1616 }
1717
1818 public function execute( $par ) {
19 - global $wgUser, $wgOut, $wgRequest;
 19+ global $wgUser, $wgOut, $wgRequest, $wgArticleFeedbackDashboard;
2020
2121 $wgOut->addModules( 'ext.articleFeedback.dashboard' );
2222 $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+ }
2630 }
2731
2832 /* Protected Methods */
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php
@@ -139,8 +139,6 @@
140140 $wgAPIListModules['articlefeedback'] = 'ApiQueryArticleFeedback';
141141 $wgAPIModules['articlefeedback'] = 'ApiArticleFeedback';
142142
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';

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r87023Added $wgArticleFeedbackDashboard to enable/disable dashboard page.tparscal18:07, 27 April 2011

Status & tagging log