Index: trunk/extensions/ArticleFeedback/ArticleFeedback.hooks.php |
— | — | @@ -218,11 +218,13 @@ |
219 | 219 | global $wgArticleFeedbackCategories, |
220 | 220 | $wgArticleFeedbackLotteryOdds, |
221 | 221 | $wgArticleFeedbackTracking, |
222 | | - $wgArticleFeedbackOptions; |
| 222 | + $wgArticleFeedbackOptions, |
| 223 | + $wgArticleFeedbackNamespaces; |
223 | 224 | $vars['wgArticleFeedbackCategories'] = $wgArticleFeedbackCategories; |
224 | 225 | $vars['wgArticleFeedbackLotteryOdds'] = $wgArticleFeedbackLotteryOdds; |
225 | 226 | $vars['wgArticleFeedbackTracking'] = $wgArticleFeedbackTracking; |
226 | 227 | $vars['wgArticleFeedbackOptions'] = $wgArticleFeedbackOptions; |
| 228 | + $vars['wgArticleFeedbackNamespaces'] = $wgArticleFeedbackNamespaces; |
227 | 229 | return true; |
228 | 230 | } |
229 | 231 | } |
Index: trunk/extensions/ArticleFeedback/modules/ext.articleFeedback/ext.articleFeedback.startup.js |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | jQuery( function( $ ) { |
7 | 7 | if ( |
8 | 8 | // Main namespace articles |
9 | | - mw.config.get( 'wgNamespaceNumber' ) === 0 |
| 9 | + $.inArray( mw.config.get( 'wgNamespaceNumber' ), mw.config.get( 'wgArticleFeedbackNamespaces', [] ) ) > -1 |
10 | 10 | // Existing pages |
11 | 11 | && mw.config.get( 'wgArticleId' ) > 0 |
12 | 12 | // View pages |
Index: trunk/extensions/ArticleFeedback/ArticleFeedback.php |
— | — | @@ -28,6 +28,10 @@ |
29 | 29 | // Extension is "disabled" if this field is an empty array (as per default configuration) |
30 | 30 | $wgArticleFeedbackCategories = array(); |
31 | 31 | |
| 32 | +// Only load the module / enable the tool in these namespaces |
| 33 | +// Default to $wgContentNamespaces (defaults to array( NS_MAIN ) ). |
| 34 | +$wgArticleFeedbackNamespaces = $wgContentNamespaces; |
| 35 | + |
32 | 36 | // Articles not categorized as on of the values in $wgArticleFeedbackCategories can still have the |
33 | 37 | // tool psudo-randomly activated by applying the following odds to a lottery based on $wgArticleId. |
34 | 38 | // The value can be a floating point number (percentage) in range of 0 - 100. Tenths of a percent |