r87023 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r87022‎ | r87023 | r87024 >
Date:18:07, 27 April 2011
Author:tparscal
Status:ok (Comments)
Tags:
Comment:
Added $wgArticleFeedbackDashboard to enable/disable dashboard page.
Modified paths:
  • /trunk/extensions/ArticleFeedback/ArticleFeedback.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php
@@ -15,6 +15,9 @@
1616
1717 /* Configuration */
1818
 19+// Enable/disable dashboard page
 20+$wgArticleFeedbackDashboard = false;
 21+
1922 // Number of revisions to keep a rating alive for
2023 $wgArticleFeedbackRatingLifetime = 30;
2124
@@ -135,6 +138,9 @@
136139 // API Registration
137140 $wgAPIListModules['articlefeedback'] = 'ApiQueryArticleFeedback';
138141 $wgAPIModules['articlefeedback'] = 'ApiArticleFeedback';
139 -// Special Page
140 -$wgSpecialPages['ArticleFeedback'] = 'SpecialArticleFeedback';
141 -$wgSpecialPageGroups['ArticleFeedback'] = 'other';
 142+
 143+if ( $wgArticleFeedbackDashboard ) {
 144+ // Special Page
 145+ $wgSpecialPages['ArticleFeedback'] = 'SpecialArticleFeedback';
 146+ $wgSpecialPageGroups['ArticleFeedback'] = 'other';
 147+}
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r87055Fixed silly mistake in adding $wgArticleFeedbackDashboard (see r87023) - now ...tparscal22:58, 27 April 2011

Comments

#Comment by Krinkle (talk | contribs)   22:48, 27 April 2011

It can't be set to true from LocalSettings (neither before or after the inclusion of the extension). It should probably be wrapped in a function/hook. Not sure which hook is suited for this though.

#Comment by 😂 (talk | contribs)   22:49, 27 April 2011

Could just use $wgExtensionFunctions.

#Comment by Krinkle (talk | contribs)   23:16, 27 April 2011

As of r87055 this check takes place inside the SpecialPage constructor, issue no longer present. Marking ok.

Status & tagging log