api: Use NS_SPECIAL instead of -1 in ApiPageSet
authorFomafix <fomafix@googlemail.com>
Sat, 29 Apr 2017 20:50:33 +0000 (22:50 +0200)
committerKrinkle <krinklemail@gmail.com>
Mon, 1 May 2017 22:56:54 +0000 (22:56 +0000)
Follows-up e2055fe0a55c.

Change-Id: Ifd33f339a3c5ec475cc3c6b2fba57c35386bab8b

includes/api/ApiPageSet.php

index 5609ad8..599b3de 100644 (file)
@@ -1356,7 +1356,7 @@ class ApiPageSet extends ApiBase {
                        }
                }
                foreach ( $this->mGeneratorData as $ns => $dbkeys ) {
-                       if ( $ns === -1 ) {
+                       if ( $ns === NS_SPECIAL ) {
                                $pages = [];
                                foreach ( $this->mSpecialTitles as $id => $title ) {
                                        $pages[$title->getDBkey()] = $id;