diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2011-06-22 11:28:20 +0200 |
commit | 9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch) | |
tree | 46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/specials/SpecialTags.php | |
parent | 78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff) |
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/specials/SpecialTags.php')
-rw-r--r-- | includes/specials/SpecialTags.php | 38 |
1 files changed, 30 insertions, 8 deletions
diff --git a/includes/specials/SpecialTags.php b/includes/specials/SpecialTags.php index 57feeae7..c2aecf47 100644 --- a/includes/specials/SpecialTags.php +++ b/includes/specials/SpecialTags.php @@ -1,8 +1,34 @@ <?php +/** + * Implements Special:Tags + * + * 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 + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * 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., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * http://www.gnu.org/copyleft/gpl.html + * + * @file + * @ingroup SpecialPage + */ if (!defined('MEDIAWIKI')) die; +/** + * A special page that lists tags for edits + * + * @ingroup SpecialPage + */ class SpecialTags extends SpecialPage { function __construct() { @@ -10,16 +36,12 @@ class SpecialTags extends SpecialPage { } function execute( $par ) { - global $wgOut, $wgUser, $wgMessageCache; + global $wgOut; - $wgMessageCache->loadAllMessages(); - - $sk = $wgUser->getSkin(); $wgOut->setPageTitle( wfMsg( 'tags-title' ) ); - $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1</div>", 'tags-intro' ); + $wgOut->wrapWikiMsg( "<div class='mw-tags-intro'>\n$1\n</div>", 'tags-intro' ); // Write the headers - $html = ''; $html = Xml::tags( 'tr', null, Xml::tags( 'th', null, wfMsgExt( 'tags-tag', 'parseinline' ) ) . Xml::tags( 'th', null, wfMsgExt( 'tags-display-header', 'parseinline' ) ) . Xml::tags( 'th', null, wfMsgExt( 'tags-description-header', 'parseinline' ) ) . @@ -28,7 +50,7 @@ class SpecialTags extends SpecialPage { $dbr = wfGetDB( DB_SLAVE ); $res = $dbr->select( 'change_tag', array( 'ct_tag', 'count(*) as hitcount' ), array(), __METHOD__, array( 'GROUP BY' => 'ct_tag', 'ORDER BY' => 'hitcount DESC' ) ); - while ( $row = $res->fetchObject() ) { + foreach ( $res as $row ) { $html .= $this->doTagRow( $row->ct_tag, $row->hitcount ); } @@ -72,4 +94,4 @@ class SpecialTags extends SpecialPage { return Xml::tags( 'tr', null, $newRow ) . "\n"; } -}
\ No newline at end of file +} |