<?php
-
/**
- * Created on May 13, 2007
*
- * API for MediaWiki 1.8+
+ *
+ * Created on May 13, 2007
*
* Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
*
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
- * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @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->addOption( 'ORDER BY', 'cat_title' );
- $db = $this->getDB();
$res = $this->select( __METHOD__ );
$catids = array_flip( $cattitles );
}
}
+ public function getCacheMode( $params ) {
+ return 'public';
+ }
+
public function getAllowedParams() {
return array(
'continue' => null,
);
}
+ 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 'https://www.mediawiki.org/wiki/API:Properties#categoryinfo_.2F_ci';
+ }
+
public function getVersion() {
return __CLASS__ . ': $Id$';
}
-}
\ No newline at end of file
+}