Use NS_* constant for default namespace in api
authorumherirrender <umherirrender_de.wp@web.de>
Thu, 27 Dec 2012 13:54:16 +0000 (14:54 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Thu, 27 Dec 2012 13:54:16 +0000 (14:54 +0100)
Change-Id: Ic46e7fe1877c4067b1b6bbea71216c0cdf594cb2

includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQuerySearch.php

index da4840f..0420838 100644 (file)
@@ -183,7 +183,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
                                )
                        ),
                        'namespace' => array(
-                               ApiBase::PARAM_DFLT => 0,
+                               ApiBase::PARAM_DFLT => NS_MAIN,
                                ApiBase::PARAM_TYPE => 'namespace'
                        ),
                        'limit' => array(
index 16cc31d..a5abae7 100644 (file)
@@ -226,7 +226,7 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase {
                        'to' => null,
                        'prefix' => null,
                        'namespace' => array(
-                               ApiBase::PARAM_DFLT => 0,
+                               ApiBase::PARAM_DFLT => NS_MAIN,
                                ApiBase::PARAM_TYPE => 'namespace',
                        ),
                        'filterredir' => array(
index e69ccbd..8903e46 100644 (file)
@@ -307,7 +307,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        ),
                        'namespace' => array(
                                ApiBase::PARAM_TYPE => 'namespace',
-                               ApiBase::PARAM_DFLT => 0,
+                               ApiBase::PARAM_DFLT => NS_MAIN,
                        ),
                        'limit' => array(
                                ApiBase::PARAM_DFLT => 10,
index 364433d..cfd08a8 100644 (file)
@@ -205,7 +205,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                                ApiBase::PARAM_REQUIRED => true
                        ),
                        'namespace' => array(
-                               ApiBase::PARAM_DFLT => 0,
+                               ApiBase::PARAM_DFLT => NS_MAIN,
                                ApiBase::PARAM_TYPE => 'namespace',
                                ApiBase::PARAM_ISMULTI => true,
                        ),