summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryCategoryInfo.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-12-27 15:41:37 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-12-31 11:43:28 +0100
commitc1f9b1f7b1b77776192048005dcc66dcf3df2bfb (patch)
tree2b38796e738dd74cb42ecd9bfd151803108386bc /includes/api/ApiQueryCategoryInfo.php
parentb88ab0086858470dd1f644e64cb4e4f62bb2be9b (diff)
Update to MediaWiki 1.24.1
Diffstat (limited to 'includes/api/ApiQueryCategoryInfo.php')
-rw-r--r--includes/api/ApiQueryCategoryInfo.php42
1 files changed, 10 insertions, 32 deletions
diff --git a/includes/api/ApiQueryCategoryInfo.php b/includes/api/ApiQueryCategoryInfo.php
index a889272e..6e9f33c1 100644
--- a/includes/api/ApiQueryCategoryInfo.php
+++ b/includes/api/ApiQueryCategoryInfo.php
@@ -32,7 +32,7 @@
*/
class ApiQueryCategoryInfo extends ApiQueryBase {
- public function __construct( $query, $moduleName ) {
+ public function __construct( ApiQuery $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'ci' );
}
@@ -45,7 +45,7 @@ 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 */
@@ -63,7 +63,13 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
'pp_propname' => 'hiddencat' ) ),
) );
- $this->addFields( array( 'cat_title', 'cat_pages', 'cat_subcats', 'cat_files', 'cat_hidden' => 'pp_propname' ) );
+ $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'] ) ) {
@@ -108,36 +114,8 @@ class ApiQueryCategoryInfo extends ApiQueryBase {
);
}
- public function getResultProperties() {
- return array(
- ApiBase::PROP_LIST => false,
- '' => array(
- 'size' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => false
- ),
- 'pages' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => false
- ),
- 'files' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => false
- ),
- 'subcats' => array(
- ApiBase::PROP_TYPE => 'integer',
- ApiBase::PROP_NULLABLE => false
- ),
- 'hidden' => array(
- ApiBase::PROP_TYPE => 'boolean',
- ApiBase::PROP_NULLABLE => false
- )
- )
- );
- }
-
public function getDescription() {
- return 'Returns information about the given categories';
+ return 'Returns information about the given categories.';
}
public function getExamples() {