X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllPages.php;h=b7bd65a53cbfee42f15ff92d94f688eecd3be2a1;hb=e2e6f7767ef58659904422c36d390c230b59852f;hp=b283177859ad2c6df0e1c359bcf4cf00b71b07fe;hpb=e50ef5784e237ce26c91ec402cb94669c78e303e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllPages.php b/includes/api/ApiQueryAllPages.php index b283177859..b7bd65a53c 100644 --- a/includes/api/ApiQueryAllPages.php +++ b/includes/api/ApiQueryAllPages.php @@ -225,8 +225,6 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase { } public function getAllowedParams() { - global $wgRestrictionLevels; - return array( 'from' => null, 'continue' => null, @@ -255,7 +253,7 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase { ApiBase::PARAM_ISMULTI => true ), 'prlevel' => array( - ApiBase::PARAM_TYPE => $wgRestrictionLevels, + ApiBase::PARAM_TYPE => $this->getConfig()->get( 'RestrictionLevels' ), ApiBase::PARAM_ISMULTI => true ), 'prfiltercascade' => array( @@ -330,31 +328,10 @@ class ApiQueryAllPages extends ApiQueryGeneratorBase { ); } - public function getResultProperties() { - return array( - '' => array( - 'pageid' => 'integer', - 'ns' => 'namespace', - 'title' => 'string' - ) - ); - } - public function getDescription() { return 'Enumerate all pages sequentially in a given namespace.'; } - public function getPossibleErrors() { - return array_merge( parent::getPossibleErrors(), array( - array( - 'code' => 'params', - 'info' => 'Use "gapfilterredir=nonredirects" option instead of ' . - '"redirects" when using allpages as a generator' - ), - array( 'code' => 'params', 'info' => 'prlevel may not be used without prtype' ), - ) ); - } - public function getExamples() { return array( 'api.php?action=query&list=allpages&apfrom=B' => array(