Call method with the same name it's defined with
[lhc/web/wiklou.git] / includes / api / ApiQueryCategoryInfo.php
index 76246a2..574ef6e 100644 (file)
@@ -45,9 +45,10 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
                $categories = $alltitles[NS_CATEGORY];
 
                $titles = $this->getPageSet()->getGoodTitles() +
-                                       $this->getPageSet()->getMissingTitles();
+                       $this->getPageSet()->getMissingTitles();
                $cattitles = array();
                foreach ( $categories as $c ) {
+                       /** @var $t Title */
                        $t = $titles[$c];
                        $cattitles[$c] = $t->getDBkey();
                }
@@ -62,7 +63,13 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
                                'pp_propname' => 'hiddencat' ) ),
                ) );
 
-               $this->addFields( array( 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'pp_propname AS cat_hidden' ) );
+               $this->addFields( array(
+                       'cat_title',
+                       'cat_pages',
+                       'cat_subcats',
+                       'cat_files',
+                       'cat_hidden' => 'pp_propname'
+               ) );
                $this->addWhere( array( 'cat_title' => $cattitles ) );
 
                if ( !is_null( $params['continue'] ) ) {
@@ -146,8 +153,4 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
        public function getHelpUrls() {
                return 'https://www.mediawiki.org/wiki/API:Properties#categoryinfo_.2F_ci';
        }
-
-       public function getVersion() {
-               return __CLASS__ . ': $Id$';
-       }
 }