X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllCategories.php;h=a2fb5c364e25ff1ad11144eb896a54795934e822;hb=5446238520cceb067792338cdfc83a343b480e15;hp=233ea75f864096e228b06b9b95baab1667b7a30d;hpb=53d7092ab40c20748d17b051e9c5b8be0a551049;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllCategories.php b/includes/api/ApiQueryAllCategories.php index 233ea75f86..a2fb5c364e 100644 --- a/includes/api/ApiQueryAllCategories.php +++ b/includes/api/ApiQueryAllCategories.php @@ -57,6 +57,7 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { $this->addTables( 'category' ); $this->addFields( 'cat_title' ); + $this->addWhere( 'cat_pages > 0' ); $dir = ( $params['dir'] == 'descending' ? 'older' : 'newer' ); $from = ( is_null( $params['from'] ) ? null : $this->titlePartToKey( $params['from'] ) ); @@ -192,6 +193,23 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase { ); } + public function getResultProperties() { + return array( + '' => array( + '*' => 'string' + ), + 'size' => array( + 'size' => 'integer', + 'pages' => 'integer', + 'files' => 'integer', + 'subcats' => 'integer' + ), + 'hidden' => array( + 'hidden' => 'boolean' + ) + ); + } + public function getDescription() { return 'Enumerate all categories'; }