*
* Created on May 13, 2007
*
- * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
+ * Copyright © 2006 Yuri Astrakhan "<Firstname><Lastname>@gmail.com"
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* @file
*/
-if ( !defined( 'MEDIAWIKI' ) ) {
- // Eclipse helper - will be ignored in production
- require_once( "ApiQueryBase.php" );
-}
-
/**
- * This query adds the <categories> subelement to all pages with the list of categories the page is in
+ * This query adds the "<categories>" subelement to all pages with the list of
+ * categories the page is in.
*
* @ingroup API
*/
'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'] ) ) {
);
}
+ 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';
}
- protected function getExamples() {
+ public function getExamples() {
return 'api.php?action=query&prop=categoryinfo&titles=Category:Foo|Category:Bar';
}
public function getHelpUrls() {
- return 'http://www.mediawiki.org/wiki/API:Properties#categoryinfo_.2F_ci';
+ return 'https://www.mediawiki.org/wiki/API:Properties#categoryinfo_.2F_ci';
}
public function getVersion() {