Index: trunk/phase3/CREDITS |
— | — | @@ -83,7 +83,6 @@ |
84 | 84 | * Marcus Buck |
85 | 85 | * Marooned |
86 | 86 | * mati |
87 | | -* Matthew Britton |
88 | 87 | * Max Semenik |
89 | 88 | * Michael De La Rue |
90 | 89 | * Michael Walsh |
Index: trunk/phase3/includes/ChangeTags.php |
— | — | @@ -185,35 +185,4 @@ |
186 | 186 | $wgMemc->set( $key, $emptyTags, 300 ); |
187 | 187 | return $emptyTags; |
188 | 188 | } |
189 | | - |
190 | | - /** Returns associative array of tag names and hitcounts */ |
191 | | - static function getHitCounts() { |
192 | | - |
193 | | - global $wgMemc; |
194 | | - $key = wfMemcKey( 'hitcounts' ); |
195 | | - |
196 | | - if ($hitcounts = $wgMemc->get( $key )) |
197 | | - return $hitcounts; |
198 | | - |
199 | | - $dbr = wfGetDB( DB_SLAVE ); |
200 | | - $hitcounts = array(); |
201 | | - |
202 | | - // Fetch defined tags |
203 | | - $res = $dbr->select( 'valid_tag', 'vt_tag', array(), __METHOD__ ); |
204 | | - while( $row = $res->fetchObject() ) { |
205 | | - $hitcounts[$row->vt_tag] = 0; |
206 | | - } |
207 | | - |
208 | | - // Fetch hit counts |
209 | | - $res = $dbr->select( 'change_tag', array('ct_tag', 'count(*) AS hitcount'), array(), __METHOD__, array('GROUP BY' => 'ct_tag', 'ORDER BY' => 'hitcount DESC') ); |
210 | | - |
211 | | - while( $row = $res->fetchObject() ) { |
212 | | - $hitcounts[$row->ct_tag] = $row->hitcount; |
213 | | - } |
214 | | - |
215 | | - // Short-term caching |
216 | | - $wgMemc->set( $key, $hitcounts, 300 ); |
217 | | - return $hitcounts; |
218 | | - } |
219 | | - |
220 | 189 | } |
Index: trunk/phase3/includes/api/ApiQueryTags.php |
— | — | @@ -1,167 +0,0 @@ |
2 | | -<?php |
3 | | - |
4 | | -/* |
5 | | - * Created on Jul 9, 2009 |
6 | | - * |
7 | | - * API for MediaWiki 1.8+ |
8 | | - * |
9 | | - * Copyright (C) 2009 Matthew Britton <firstname>.<lastname>@btinternet.com |
10 | | - * |
11 | | - * This program is free software; you can redistribute it and/or modify |
12 | | - * it under the terms of the GNU General Public License as published by |
13 | | - * the Free Software Foundation; either version 2 of the License, or |
14 | | - * (at your option) any later version. |
15 | | - * |
16 | | - * This program is distributed in the hope that it will be useful, |
17 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
18 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
19 | | - * GNU General Public License for more details. |
20 | | - * |
21 | | - * You should have received a copy of the GNU General Public License along |
22 | | - * with this program; if not, write to the Free Software Foundation, Inc., |
23 | | - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
24 | | - * http://www.gnu.org/copyleft/gpl.html |
25 | | - */ |
26 | | - |
27 | | -if (!defined('MEDIAWIKI')) { |
28 | | - // Eclipse helper - will be ignored in production |
29 | | - require_once ('ApiQueryBase.php'); |
30 | | -} |
31 | | - |
32 | | -/** |
33 | | - * Query module to enumerate change tags. |
34 | | - * |
35 | | - * @ingroup API |
36 | | - */ |
37 | | -class ApiQueryTags extends ApiQueryBase { |
38 | | - |
39 | | - private $limit, $result; |
40 | | - private $fld_displayname = false, $fld_description = false, |
41 | | - $fld_hitcount = false; |
42 | | - |
43 | | - public function __construct($query, $moduleName) { |
44 | | - parent :: __construct($query, $moduleName, 'tg'); |
45 | | - } |
46 | | - |
47 | | - public function execute() { |
48 | | - $params = $this->extractRequestParams(); |
49 | | - |
50 | | - $prop = array_flip($params['prop']); |
51 | | - |
52 | | - $this->fld_displayname = isset($prop['displayname']); |
53 | | - $this->fld_description = isset($prop['description']); |
54 | | - $this->fld_hitcount = isset($prop['hitcount']); |
55 | | - |
56 | | - $this->limit = $params['limit']; |
57 | | - $this->result = $this->getResult(); |
58 | | - |
59 | | - $pageSet = $this->getPageSet(); |
60 | | - $titles = $pageSet->getTitles(); |
61 | | - $data = array(); |
62 | | - $ok = true; |
63 | | - |
64 | | - if($this->fld_hitcount) { |
65 | | - foreach( ChangeTags::getHitCounts() as $tag => $count ) { |
66 | | - if(!$ok) break; |
67 | | - $ok = $this->doTag( $tag, $count ); |
68 | | - } |
69 | | - } else { |
70 | | - foreach( ChangeTags::listDefinedTags() as $tag ) { |
71 | | - if(!$ok) break; |
72 | | - $ok = $this->doTag( $tag, 0 ); |
73 | | - } |
74 | | - } |
75 | | - |
76 | | - $this->result->setIndexedTagName_internal(array('query', $this->getModuleName()), 'tag'); |
77 | | - } |
78 | | - |
79 | | - private function doTag( $tagName, $hitcount ) { |
80 | | - static $count = 0; |
81 | | - static $doneTags = array(); |
82 | | - |
83 | | - if ( in_array( $tagName, $doneTags ) ) { |
84 | | - return true; |
85 | | - } |
86 | | - |
87 | | - if(++$count > $this->limit) |
88 | | - { |
89 | | - $this->setContinueEnumParameter('continue', $tagName); |
90 | | - return false; |
91 | | - } |
92 | | - |
93 | | - $tag = array(); |
94 | | - $tag['name'] = $tagName; |
95 | | - |
96 | | - if($this->fld_displayname) |
97 | | - $tag['displayname'] = ChangeTags::tagDescription( $tagName ); |
98 | | - |
99 | | - if($this->fld_description) |
100 | | - { |
101 | | - $msg = wfMsg( "tag-$tagName-description" ); |
102 | | - $msg = wfEmptyMsg( "tag-$tagName-description", $msg ) ? '' : $msg; |
103 | | - $tag['description'] = $msg; |
104 | | - } |
105 | | - |
106 | | - if($this->fld_hitcount) |
107 | | - $tag['hitcount'] = $hitcount; |
108 | | - |
109 | | - $doneTags[] = $tagName; |
110 | | - |
111 | | - $fit = $this->result->addValue(array('query', $this->getModuleName()), null, $tag); |
112 | | - if(!$fit) |
113 | | - { |
114 | | - $this->setContinueEnumParameter('continue', $tagName); |
115 | | - return false; |
116 | | - } |
117 | | - |
118 | | - return true; |
119 | | - } |
120 | | - |
121 | | - public function getAllowedParams() { |
122 | | - return array ( |
123 | | - 'continue' => array( |
124 | | - ), |
125 | | - 'end' => array( |
126 | | - ), |
127 | | - 'limit' => array( |
128 | | - ApiBase :: PARAM_DFLT => 10, |
129 | | - ApiBase :: PARAM_TYPE => 'limit', |
130 | | - ApiBase :: PARAM_MIN => 1, |
131 | | - ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1, |
132 | | - ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
133 | | - ), |
134 | | - 'prop' => array( |
135 | | - ApiBase :: PARAM_DFLT => 'name', |
136 | | - ApiBase :: PARAM_TYPE => array( |
137 | | - 'name', |
138 | | - 'displayname', |
139 | | - 'description', |
140 | | - 'hitcount' |
141 | | - ), |
142 | | - ApiBase :: PARAM_ISMULTI => true |
143 | | - ) |
144 | | - ); |
145 | | - } |
146 | | - |
147 | | - public function getParamDescription() { |
148 | | - return array ( |
149 | | - 'continue' => 'When more results are available, use this to continue', |
150 | | - 'limit' => 'The maximum number of tags to list', |
151 | | - 'prop' => 'Which properties to get', |
152 | | - ); |
153 | | - } |
154 | | - |
155 | | - public function getDescription() { |
156 | | - return 'List change tags.'; |
157 | | - } |
158 | | - |
159 | | - protected function getExamples() { |
160 | | - return array ( |
161 | | - 'api.php?action=query&list=tags&tgprop=displayname|description|hitcount' |
162 | | - ); |
163 | | - } |
164 | | - |
165 | | - public function getVersion() { |
166 | | - return __CLASS__ . ': $Id$'; |
167 | | - } |
168 | | -} |
Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | |
44 | 44 | private $fld_comment = false, $fld_user = false, $fld_flags = false, |
45 | 45 | $fld_timestamp = false, $fld_title = false, $fld_ids = false, |
46 | | - $fld_sizes = false, $fld_tags = false; |
| 46 | + $fld_sizes = false; |
47 | 47 | /** |
48 | 48 | * Get an array mapping token names to their handler functions. |
49 | 49 | * The prototype for a token function is func($pageid, $title, $rc) |
— | — | @@ -174,7 +174,6 @@ |
175 | 175 | $this->fld_redirect = isset($prop['redirect']); |
176 | 176 | $this->fld_patrolled = isset($prop['patrolled']); |
177 | 177 | $this->fld_loginfo = isset($prop['loginfo']); |
178 | | - $this->fld_tags = isset($prop['tags']); |
179 | 178 | |
180 | 179 | global $wgUser; |
181 | 180 | if($this->fld_patrolled && !$wgUser->useRCPatrol() && !$wgUser->useNPPatrol()) |
— | — | @@ -204,17 +203,6 @@ |
205 | 204 | $this->addFields('page_is_redirect'); |
206 | 205 | } |
207 | 206 | } |
208 | | - |
209 | | - if($this->fld_tags || !is_null($params['tag'])) { |
210 | | - $this->addTables('tag_summary'); |
211 | | - $this->addJoinConds(array('tag_summary' => array('LEFT JOIN', array('rc_id=ts_rc_id')))); |
212 | | - $this->addFields('ts_tags'); |
213 | | - } |
214 | | - |
215 | | - if(!is_null($params['tag'])) { |
216 | | - $this->addWhereFld('ts_tags' , $params['tag']); |
217 | | - } |
218 | | - |
219 | 207 | $this->token = $params['token']; |
220 | 208 | $this->addOption('LIMIT', $params['limit'] +1); |
221 | 209 | $this->addOption('USE INDEX', array('recentchanges' => $index)); |
— | — | @@ -347,10 +335,6 @@ |
348 | 336 | $row->rc_log_type, $row->rc_timestamp); |
349 | 337 | } |
350 | 338 | |
351 | | - if ($this->fld_tags && isset($row->ts_tags)) { |
352 | | - $vals['tags'] = $row->ts_tags; |
353 | | - } |
354 | | - |
355 | 339 | if(!is_null($this->token)) |
356 | 340 | { |
357 | 341 | $tokenFunctions = $this->getTokenFunctions(); |
— | — | @@ -424,7 +408,6 @@ |
425 | 409 | 'redirect', |
426 | 410 | 'patrolled', |
427 | 411 | 'loginfo', |
428 | | - 'tags', |
429 | 412 | ) |
430 | 413 | ), |
431 | 414 | 'token' => array( |
— | — | @@ -460,8 +443,7 @@ |
461 | 444 | 'new', |
462 | 445 | 'log' |
463 | 446 | ) |
464 | | - ), |
465 | | - 'tag' => null, |
| 447 | + ) |
466 | 448 | ); |
467 | 449 | } |
468 | 450 | |
— | — | @@ -480,7 +462,6 @@ |
481 | 463 | 'For example, to see only minor edits done by logged-in users, set show=minor|!anon' |
482 | 464 | ), |
483 | 465 | 'type' => 'Which types of changes to show.', |
484 | | - 'tag' => 'Only list changes with this tag', |
485 | 466 | 'limit' => 'How many total changes to return.' |
486 | 467 | ); |
487 | 468 | } |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -51,7 +51,6 @@ |
52 | 52 | $this->fld_timestamp = in_array('timestamp', $prop); |
53 | 53 | $this->fld_comment = in_array('comment', $prop); |
54 | 54 | $this->fld_details = in_array('details', $prop); |
55 | | - $this->fld_tags = in_array('tags', $prop); |
56 | 55 | |
57 | 56 | list($tbl_logging, $tbl_page, $tbl_user) = $db->tableNamesN('logging', 'page', 'user'); |
58 | 57 | |
— | — | @@ -86,16 +85,6 @@ |
87 | 86 | $this->addFieldsIf('log_comment', $this->fld_comment); |
88 | 87 | $this->addFieldsIf('log_params', $this->fld_details); |
89 | 88 | |
90 | | - if($this->fld_tags || !is_null($params['tag'])) { |
91 | | - $this->addTables('tag_summary'); |
92 | | - $this->addJoinConds(array('tag_summary' => array('LEFT JOIN', 'log_id=ts_log_id'))); |
93 | | - $this->addFields('ts_tags'); |
94 | | - } |
95 | | - |
96 | | - if( !is_null($params['tag']) ) { |
97 | | - $this->addWhereFld('ts_tags', $params['tag']); |
98 | | - } |
99 | | - |
100 | 89 | if( !is_null($params['type']) ) { |
101 | 90 | $this->addWhereFld('log_type', $params['type']); |
102 | 91 | $index = 'type_time'; |
— | — | @@ -258,10 +247,6 @@ |
259 | 248 | } |
260 | 249 | } |
261 | 250 | |
262 | | - if ($this->fld_tags && isset($row->ts_tags)) { |
263 | | - $vals['tags'] = $row->ts_tags; |
264 | | - } |
265 | | - |
266 | 251 | return $vals; |
267 | 252 | } |
268 | 253 | |
— | — | @@ -280,7 +265,6 @@ |
281 | 266 | 'timestamp', |
282 | 267 | 'comment', |
283 | 268 | 'details', |
284 | | - 'tags' |
285 | 269 | ) |
286 | 270 | ), |
287 | 271 | 'type' => array ( |
— | — | @@ -301,7 +285,6 @@ |
302 | 286 | ), |
303 | 287 | 'user' => null, |
304 | 288 | 'title' => null, |
305 | | - 'tag' => null, |
306 | 289 | 'limit' => array ( |
307 | 290 | ApiBase :: PARAM_DFLT => 10, |
308 | 291 | ApiBase :: PARAM_TYPE => 'limit', |
— | — | @@ -321,7 +304,6 @@ |
322 | 305 | 'dir' => 'In which direction to enumerate.', |
323 | 306 | 'user' => 'Filter entries to those made by the given user.', |
324 | 307 | 'title' => 'Filter entries to those related to a page.', |
325 | | - 'tag' => 'Only list entries with this tag', |
326 | 308 | 'limit' => 'How many total event entries to return.' |
327 | 309 | ); |
328 | 310 | } |
Index: trunk/phase3/includes/api/ApiQuery.php |
— | — | @@ -74,7 +74,6 @@ |
75 | 75 | 'logevents' => 'ApiQueryLogEvents', |
76 | 76 | 'recentchanges' => 'ApiQueryRecentChanges', |
77 | 77 | 'search' => 'ApiQuerySearch', |
78 | | - 'tags' => 'ApiQueryTags', |
79 | 78 | 'usercontribs' => 'ApiQueryContributions', |
80 | 79 | 'watchlist' => 'ApiQueryWatchlist', |
81 | 80 | 'watchlistraw' => 'ApiQueryWatchlistRaw', |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | } |
44 | 44 | |
45 | 45 | private $fld_ids = false, $fld_flags = false, $fld_timestamp = false, $fld_size = false, |
46 | | - $fld_comment = false, $fld_user = false, $fld_content = false, $fld_tags = false; |
| 46 | + $fld_comment = false, $fld_user = false, $fld_content = false; |
47 | 47 | |
48 | 48 | protected function getTokenFunctions() { |
49 | 49 | // tokenname => function |
— | — | @@ -121,8 +121,9 @@ |
122 | 122 | } |
123 | 123 | |
124 | 124 | $db = $this->getDB(); |
125 | | - $this->addTables(array('page', 'revision')); |
| 125 | + $this->addTables('revision'); |
126 | 126 | $this->addFields(Revision::selectFields()); |
| 127 | + $this->addTables('page'); |
127 | 128 | $this->addWhere('page_id = rev_page'); |
128 | 129 | |
129 | 130 | $prop = array_flip($params['prop']); |
— | — | @@ -134,7 +135,6 @@ |
135 | 136 | $this->fld_timestamp = isset ($prop['timestamp']); |
136 | 137 | $this->fld_comment = isset ($prop['comment']); |
137 | 138 | $this->fld_size = isset ($prop['size']); |
138 | | - $this->fld_tags = isset ($prop['tags']); |
139 | 139 | $this->fld_user = isset ($prop['user']); |
140 | 140 | $this->token = $params['token']; |
141 | 141 | $this->diffto = $params['diffto']; |
— | — | @@ -143,16 +143,6 @@ |
144 | 144 | $this->addFields( Revision::selectPageFields() ); |
145 | 145 | } |
146 | 146 | |
147 | | - if ($this->fld_tags || !is_null($params['tag'])) { |
148 | | - $this->addTables('tag_summary'); |
149 | | - $this->addJoinConds(array('tag_summary' => array('LEFT JOIN', array('rev_id=ts_rev_id')))); |
150 | | - $this->addFields('ts_tags'); |
151 | | - } |
152 | | - |
153 | | - if( !is_null($params['tag']) ) { |
154 | | - $this->addWhereFld('ts_tags', $params['tag']); |
155 | | - } |
156 | | - |
157 | 147 | if (isset ($prop['content'])) { |
158 | 148 | |
159 | 149 | // For each page we will request, the user must have read rights for that page |
— | — | @@ -303,9 +293,9 @@ |
304 | 294 | $this->setContinueEnumParameter('startid', intval($row->rev_id)); |
305 | 295 | break; |
306 | 296 | } |
307 | | - |
| 297 | + $revision = new Revision( $row ); |
308 | 298 | // |
309 | | - $fit = $this->addPageSubItem($row->rev_page, $this->extractRowInfo($row), 'rev'); |
| 299 | + $fit = $this->addPageSubItem($revision->getPage(), $this->extractRowInfo($revision), 'rev'); |
310 | 300 | if(!$fit) |
311 | 301 | { |
312 | 302 | if($enumRevMode) |
— | — | @@ -321,8 +311,7 @@ |
322 | 312 | $db->freeResult($res); |
323 | 313 | } |
324 | 314 | |
325 | | - private function extractRowInfo( $row ) { |
326 | | - $revision = new Revision( $row ); |
| 315 | + private function extractRowInfo( $revision ) { |
327 | 316 | $title = $revision->getTitle(); |
328 | 317 | $vals = array (); |
329 | 318 | |
— | — | @@ -364,9 +353,6 @@ |
365 | 354 | } |
366 | 355 | } |
367 | 356 | |
368 | | - if ($this->fld_tags && $row->ts_tags) |
369 | | - $vals['tags'] = $row->ts_tags; |
370 | | - |
371 | 357 | if(!is_null($this->token)) |
372 | 358 | { |
373 | 359 | $tokenFunctions = $this->getTokenFunctions(); |
— | — | @@ -441,7 +427,6 @@ |
442 | 428 | 'size', |
443 | 429 | 'comment', |
444 | 430 | 'content', |
445 | | - 'tags' |
446 | 431 | ) |
447 | 432 | ), |
448 | 433 | 'limit' => array ( |
— | — | @@ -475,7 +460,6 @@ |
476 | 461 | 'excludeuser' => array( |
477 | 462 | ApiBase :: PARAM_TYPE => 'user' |
478 | 463 | ), |
479 | | - 'tag' => null, |
480 | 464 | 'expandtemplates' => false, |
481 | 465 | 'generatexml' => false, |
482 | 466 | 'section' => null, |
— | — | @@ -499,7 +483,6 @@ |
500 | 484 | 'dir' => 'direction of enumeration - towards "newer" or "older" revisions (enum)', |
501 | 485 | 'user' => 'only include revisions made by user', |
502 | 486 | 'excludeuser' => 'exclude revisions made by user', |
503 | | - 'tag' => 'only list revisions with this tag', |
504 | 487 | 'expandtemplates' => 'expand templates in revision content', |
505 | 488 | 'generatexml' => 'generate XML parse tree for revision content', |
506 | 489 | 'section' => 'only retrieve the content of this section', |
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -42,7 +42,7 @@ |
43 | 43 | private $params, $username; |
44 | 44 | private $fld_ids = false, $fld_title = false, $fld_timestamp = false, |
45 | 45 | $fld_comment = false, $fld_flags = false, |
46 | | - $fld_patrolled = false, $fld_tags = false; |
| 46 | + $fld_patrolled = false; |
47 | 47 | |
48 | 48 | public function execute() { |
49 | 49 | |
— | — | @@ -57,7 +57,6 @@ |
58 | 58 | $this->fld_flags = isset($prop['flags']); |
59 | 59 | $this->fld_timestamp = isset($prop['timestamp']); |
60 | 60 | $this->fld_patrolled = isset($prop['patrolled']); |
61 | | - $this->fld_tags = isset($prop['tags']); |
62 | 61 | |
63 | 62 | // TODO: if the query is going only against the revision table, should this be done? |
64 | 63 | $this->selectNamedDB('contributions', DB_SLAVE, 'contributions'); |
— | — | @@ -142,7 +141,7 @@ |
143 | 142 | private function prepareQuery() { |
144 | 143 | // We're after the revision table, and the corresponding page |
145 | 144 | // row for anything we retrieve. We may also need the |
146 | | - // recentchanges row and/or tag summary row. |
| 145 | + // recentchanges row. |
147 | 146 | global $wgUser; |
148 | 147 | $tables = array('page', 'revision'); // Order may change |
149 | 148 | $this->addWhere('page_id=rev_page'); |
— | — | @@ -246,16 +245,6 @@ |
247 | 246 | $this->addFieldsIf('rev_minor_edit', $this->fld_flags); |
248 | 247 | $this->addFieldsIf('rev_parent_id', $this->fld_flags); |
249 | 248 | $this->addFieldsIf('rc_patrolled', $this->fld_patrolled); |
250 | | - |
251 | | - if($this->fld_tags || !is_null($this->params['tag'])) { |
252 | | - $this->addTables('tag_summary'); |
253 | | - $this->addJoinConds(array('tag_summary' => array('LEFT JOIN', array('rev_id=ts_rev_id')))); |
254 | | - $this->addFields('ts_tags'); |
255 | | - } |
256 | | - |
257 | | - if( !is_null($this->params['tag']) ) { |
258 | | - $this->addWhereFld('ts_tags', $this->params['tag']); |
259 | | - } |
260 | 249 | } |
261 | 250 | |
262 | 251 | /** |
— | — | @@ -303,9 +292,6 @@ |
304 | 293 | if ($this->fld_size && !is_null($row->rev_len)) |
305 | 294 | $vals['size'] = intval($row->rev_len); |
306 | 295 | |
307 | | - if ($this->fld_tags && $row->ts_tags) |
308 | | - $vals['tags'] = $row->ts_tags; |
309 | | - |
310 | 296 | return $vals; |
311 | 297 | } |
312 | 298 | |
— | — | @@ -357,7 +343,6 @@ |
358 | 344 | 'size', |
359 | 345 | 'flags', |
360 | 346 | 'patrolled', |
361 | | - 'tags', |
362 | 347 | ) |
363 | 348 | ), |
364 | 349 | 'show' => array ( |
— | — | @@ -369,7 +354,6 @@ |
370 | 355 | '!patrolled', |
371 | 356 | ) |
372 | 357 | ), |
373 | | - 'tag' => null, |
374 | 358 | ); |
375 | 359 | } |
376 | 360 | |
— | — | @@ -386,7 +370,6 @@ |
387 | 371 | 'prop' => 'Include additional pieces of information', |
388 | 372 | 'show' => array('Show only items that meet this criteria, e.g. non minor edits only: show=!minor', |
389 | 373 | 'NOTE: if show=patrolled or show=!patrolled is set, revisions older than $wgRCMaxAge won\'t be shown',), |
390 | | - 'tag' => 'Only list contributions with this tag', |
391 | 374 | ); |
392 | 375 | } |
393 | 376 | |
Index: trunk/phase3/includes/AutoLoader.php |
— | — | @@ -307,7 +307,6 @@ |
308 | 308 | 'ApiQueryRevisions' => 'includes/api/ApiQueryRevisions.php', |
309 | 309 | 'ApiQuerySearch' => 'includes/api/ApiQuerySearch.php', |
310 | 310 | 'ApiQuerySiteinfo' => 'includes/api/ApiQuerySiteinfo.php', |
311 | | - 'ApiQueryTags' => 'includes/api/ApiQueryTags.php', |
312 | 311 | 'ApiQueryUserInfo' => 'includes/api/ApiQueryUserInfo.php', |
313 | 312 | 'ApiQueryUsers' => 'includes/api/ApiQueryUsers.php', |
314 | 313 | 'ApiQueryWatchlist' => 'includes/api/ApiQueryWatchlist.php', |
Index: trunk/phase3/includes/specials/SpecialTags.php |
— | — | @@ -25,11 +25,17 @@ |
26 | 26 | Xml::tags( 'th', null, wfMsgExt( 'tags-description-header', 'parseinline' ) ) . |
27 | 27 | Xml::tags( 'th', null, wfMsgExt( 'tags-hitcount-header', 'parseinline' ) ) |
28 | 28 | ); |
| 29 | + $dbr = wfGetDB( DB_SLAVE ); |
| 30 | + $res = $dbr->select( 'change_tag', array( 'ct_tag', 'count(*) as hitcount' ), array(), __METHOD__, array( 'GROUP BY' => 'ct_tag', 'ORDER BY' => 'hitcount DESC' ) ); |
29 | 31 | |
30 | | - foreach( ChangeTags::getHitCounts() as $tag => $hitcount ) { |
31 | | - $html .= $this->doTagRow( $tag, $hitcount ); |
| 32 | + while ( $row = $res->fetchObject() ) { |
| 33 | + $html .= $this->doTagRow( $row->ct_tag, $row->hitcount ); |
32 | 34 | } |
33 | 35 | |
| 36 | + foreach( ChangeTags::listDefinedTags() as $tag ) { |
| 37 | + $html .= $this->doTagRow( $tag, 0 ); |
| 38 | + } |
| 39 | + |
34 | 40 | $wgOut->addHTML( Xml::tags( 'table', array( 'class' => 'wikitable mw-tags-table' ), $html ) ); |
35 | 41 | } |
36 | 42 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -465,7 +465,6 @@ |
466 | 466 | * (bug 19907) $wgCrossSiteAJAXdomains added to allow specified (or all) |
467 | 467 | external domains to access api.php via AJAX, if the browser supports the |
468 | 468 | Access-Control-Allow-Origin HTTP header |
469 | | -* (bug 19004) Added support for tags to the API. |
470 | 469 | |
471 | 470 | === Languages updated in 1.16 === |
472 | 471 | |
Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/toolbar/insert-link.png |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: trunk/extensions/UsabilityInitiative/images/wikiEditor/toolbar/png24/insert-link.png |
___________________________________________________________________ |
Deleted: svn:mergeinfo |
Property changes on: trunk/extensions/LiquidThreads/schema-changes/thread_history_table.sql |
___________________________________________________________________ |
Deleted: svn:mergeinfo |