From 63601400e476c6cf43d985f3e7b9864681695ed4 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Fri, 18 Jan 2013 16:46:04 +0100 Subject: Update to MediaWiki 1.20.2 this update includes: * adjusted Arch Linux skin * updated FluxBBAuthPlugin * patch for https://bugzilla.wikimedia.org/show_bug.cgi?id=44024 --- includes/api/ApiQueryTags.php | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'includes/api/ApiQueryTags.php') diff --git a/includes/api/ApiQueryTags.php b/includes/api/ApiQueryTags.php index 12cea1d7..f97c1b2a 100644 --- a/includes/api/ApiQueryTags.php +++ b/includes/api/ApiQueryTags.php @@ -59,7 +59,7 @@ class ApiQueryTags extends ApiQueryBase { $this->addTables( 'change_tag' ); $this->addFields( 'ct_tag' ); - $this->addFieldsIf( 'count(*) AS hitcount', $this->fld_hitcount ); + $this->addFieldsIf( array( 'hitcount' => 'COUNT(*)' ), $this->fld_hitcount ); $this->addOption( 'LIMIT', $this->limit + 1 ); $this->addOption( 'GROUP BY', 'ct_tag' ); @@ -73,7 +73,7 @@ class ApiQueryTags extends ApiQueryBase { if ( !$ok ) { break; } - $ok = $this->doTag( $row->ct_tag, $row->hitcount ); + $ok = $this->doTag( $row->ct_tag, $this->fld_hitcount ? $row->hitcount : 0 ); } // include tags with no hits yet @@ -169,6 +169,23 @@ class ApiQueryTags extends ApiQueryBase { ); } + public function getResultProperties() { + return array( + '' => array( + 'name' => 'string' + ), + 'displayname' => array( + 'displayname' => 'string' + ), + 'description' => array( + 'description' => 'string' + ), + 'hitcount' => array( + 'hitcount' => 'integer' + ) + ); + } + public function getDescription() { return 'List change tags'; } -- cgit v1.2.2