<?php
-
/**
- * Created on Jul 9, 2009
*
- * API for MediaWiki 1.8+
+ *
+ * Created on Jul 9, 2009
*
* Copyright © 2009
*
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
*/
if ( !defined( 'MEDIAWIKI' ) ) {
*/
class ApiQueryTags extends ApiQueryBase {
- private $limit, $result;
+ /**
+ * @var ApiResult
+ */
+ private $result;
+
+ private $limit;
private $fld_displayname = false, $fld_description = false,
$fld_hitcount = false;
$this->limit = $params['limit'];
$this->result = $this->getResult();
- $pageSet = $this->getPageSet();
- $titles = $pageSet->getTitles();
- $data = array();
-
$this->addTables( 'change_tag' );
$this->addFields( 'ct_tag' );
$ok = true;
- while ( $row = $res->fetchObject() ) {
+ foreach ( $res as $row ) {
if ( !$ok ) {
break;
}
return true;
}
+ public function getCacheMode( $params ) {
+ return 'public';
+ }
+
public function getAllowedParams() {
return array(
'continue' => array(
return array(
'continue' => 'When more results are available, use this to continue',
'limit' => 'The maximum number of tags to list',
- 'prop' => 'Which properties to get',
+ 'prop' => array(
+ 'Which properties to get',
+ ' name - Adds name of tag',
+ ' displayname - Adds system messsage for the tag',
+ ' description - Adds description of the tag',
+ ' hitcount - Adds the amount of revisions that have this tag',
+ ),
);
}