From: Bartosz DziewoƄski Date: Wed, 22 Jul 2015 00:14:04 +0000 (+0200) Subject: mw.widgets.TitleInputWidget: Allow limiting to main namespace, too X-Git-Tag: 1.31.0-rc.0~10684^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=0f51fc6ab1de7419b1e99737e2b350357a6f75f9;p=lhc%2Fweb%2Fwiklou.git mw.widgets.TitleInputWidget: Allow limiting to main namespace, too Not sure if it was intentional or a bug, but the widget would treat `namespace: 0` (assume main namespace) in config the same as `namespace: null` (allow all namespaces). This has been changed. Change-Id: Iab2a76771de0debe9111d4ccce3477b022000e51 --- diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js b/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js index bee5920375..a9e4384c50 100644 --- a/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js +++ b/resources/src/mediawiki.widgets/mw.widgets.TitleInputWidget.js @@ -38,7 +38,7 @@ // Properties this.limit = config.limit || 10; - this.namespace = config.namespace || null; + this.namespace = config.namespace !== undefined ? config.namespace : null; this.relative = config.relative !== undefined ? config.relative : true; this.showRedirectTargets = config.showRedirectTargets !== false; this.showRedlink = !!config.showRedlink;