Merge "Add linkTrail for Central Kurdish (ckb)"
[lhc/web/wiklou.git] / includes / api / ApiQueryAllPages.php
index b283177..b7bd65a 100644 (file)
@@ -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(