summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialMostlinkedtemplates.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
committerPierre Schmitz <pierre@archlinux.de>2011-06-22 11:28:20 +0200
commit9db190c7e736ec8d063187d4241b59feaf7dc2d1 (patch)
tree46d1a0dee7febef5c2d57a9f7b972be16a163b3d /includes/specials/SpecialMostlinkedtemplates.php
parent78677c7bbdcc9739f6c10c75935898a20e1acd9e (diff)
update to MediaWiki 1.17.0
Diffstat (limited to 'includes/specials/SpecialMostlinkedtemplates.php')
-rw-r--r--includes/specials/SpecialMostlinkedtemplates.php25
1 files changed, 21 insertions, 4 deletions
diff --git a/includes/specials/SpecialMostlinkedtemplates.php b/includes/specials/SpecialMostlinkedtemplates.php
index 71a6b539..822d6bc9 100644
--- a/includes/specials/SpecialMostlinkedtemplates.php
+++ b/includes/specials/SpecialMostlinkedtemplates.php
@@ -1,7 +1,25 @@
<?php
/**
+ * Implements Special:Mostlinkedtemplates
+ *
+ * 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
+ * @author Rob Church <robchur@gmail.com>
*/
/**
@@ -9,7 +27,6 @@
* transclusion links, i.e. "most used" templates
*
* @ingroup SpecialPage
- * @author Rob Church <robchur@gmail.com>
*/
class SpecialMostlinkedtemplates extends QueryPage {
@@ -75,7 +92,7 @@ class SpecialMostlinkedtemplates extends QueryPage {
*/
public function preprocessResults( $db, $res ) {
$batch = new LinkBatch();
- while( $row = $db->fetchObject( $res ) ) {
+ foreach ( $res as $row ) {
$batch->add( $row->namespace, $row->title );
}
$batch->execute();
@@ -110,8 +127,8 @@ class SpecialMostlinkedtemplates extends QueryPage {
private function makeWlhLink( $title, $skin, $result ) {
global $wgLang;
$wlh = SpecialPage::getTitleFor( 'Whatlinkshere' );
- $label = wfMsgExt( 'nlinks', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
+ $label = wfMsgExt( 'ntransclusions', array( 'parsemag', 'escape' ),
+ $wgLang->formatNum( $result->value ) );
return $skin->link( $wlh, $label, array(), array( 'target' => $title->getPrefixedText() ) );
}
}