Remove suggestions for negative namespaces in Page Restrictions
authorMoriel Schottlender <moriel@gmail.com>
Wed, 13 Feb 2019 21:54:01 +0000 (13:54 -0800)
committerMoriel Schottlender <moriel@gmail.com>
Fri, 15 Feb 2019 01:27:33 +0000 (17:27 -0800)
When displaying suggestions for page restrictions, do not suggest
any page with negative namespace, since those are illegal for a
partial block restriction anyways, and will be rejected.

Bug: T208355
Change-Id: I71727ee1ff40255df9ad95c268f94fcb2a81a595

includes/specials/SpecialBlock.php

index a6fd55e..b4b6e26 100644 (file)
@@ -189,6 +189,7 @@ class SpecialBlock extends FormSpecialPage {
                                'max' => 10,
                                'cssclass' => 'mw-block-restriction',
                                'showMissing' => false,
+                               'excludeDynamicNamespaces' => true,
                                'input' => [
                                        'autocomplete' => false
                                ],