r107425 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107424‎ | r107425 | r107426 >
Date:21:21, 27 December 2011
Author:catrope
Status:ok
Tags:aft 
Comment:
Followup r105574 per CR: clone arrays from mw.config so we can modify them safely, rather than corrupting the global arrays
Modified paths:
  • /trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js (modified) (history)

Diff [purge]

Index: trunk/extensions/ArticleFeedbackv5/modules/ext.articleFeedbackv5/ext.articleFeedbackv5.startup.js
@@ -55,10 +55,11 @@
5656 && mw.util.getParamValue( 'printable' ) != 'yes'
5757 ) {
5858 // Collect categories for intersection tests
 59+ // Clone the arrays so we can safely modify them
5960 var categories = {
60 - 'include': mw.config.get( 'wgArticleFeedbackv5Categories', [] ),
61 - 'exclude': mw.config.get( 'wgArticleFeedbackv5BlacklistCategories', [] ),
62 - 'current': mw.config.get( 'wgCategories', [] )
 61+ 'include': [].concat( mw.config.get( 'wgArticleFeedbackv5Categories', [] ) ),
 62+ 'exclude': [].concat( mw.config.get( 'wgArticleFeedbackv5BlacklistCategories', [] ) ),
 63+ 'current': [].concat( mw.config.get( 'wgCategories', [] ) )
6364 };
6465
6566 var enable = false;

Follow-up revisions

RevisionCommit summaryAuthorDate
r1074271.18wmf1: MFT r107425catrope21:23, 27 December 2011

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r105574AFTv5: Partial fix for #32842, fix categories for sample (underscore vs space)yonishostak19:16, 8 December 2011

Status & tagging log