Merge "In LinkHolderArray::doVariants(), redlinks need to be checked as well."
[lhc/web/wiklou.git] / includes / api / ApiQueryAllCategories.php
index 233ea75..a2fb5c3 100644 (file)
@@ -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';
        }