summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialMostlinkedcategories.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
committerPierre Schmitz <pierre@archlinux.de>2012-05-03 13:01:35 +0200
commitd9022f63880ce039446fba8364f68e656b7bf4cb (patch)
tree16b40fbf17bf7c9ee6f4ead25b16dd192378050a /includes/specials/SpecialMostlinkedcategories.php
parent27cf83d177256813e2e802241085fce5dd0f3fb9 (diff)
Update to MediaWiki 1.19.0
Diffstat (limited to 'includes/specials/SpecialMostlinkedcategories.php')
-rw-r--r--includes/specials/SpecialMostlinkedcategories.php19
1 files changed, 8 insertions, 11 deletions
diff --git a/includes/specials/SpecialMostlinkedcategories.php b/includes/specials/SpecialMostlinkedcategories.php
index 195282f7..7fb9dea9 100644
--- a/includes/specials/SpecialMostlinkedcategories.php
+++ b/includes/specials/SpecialMostlinkedcategories.php
@@ -25,7 +25,7 @@
*/
/**
- * A querypage to show categories ordered in descending order by the pages in them
+ * A querypage to show categories ordered in descending order by the pages in them
*
* @ingroup SpecialPage
*/
@@ -35,16 +35,14 @@ class MostlinkedCategoriesPage extends QueryPage {
parent::__construct( $name );
}
- function isExpensive() { return true; }
function isSyndicated() { return false; }
function getQueryInfo() {
return array (
- 'tables' => array ( 'categorylinks' ),
- 'fields' => array ( 'cl_to AS title',
+ 'tables' => array ( 'category' ),
+ 'fields' => array ( 'cat_title AS title',
NS_CATEGORY . ' AS namespace',
- 'COUNT(*) AS value' ),
- 'options' => array ( 'GROUP BY' => 'cl_to' )
+ 'cat_pages AS value' ),
);
}
@@ -76,15 +74,14 @@ class MostlinkedCategoriesPage extends QueryPage {
* @return string
*/
function formatResult( $skin, $result ) {
- global $wgLang, $wgContLang;
+ global $wgContLang;
$nt = Title::makeTitle( NS_CATEGORY, $result->title );
$text = $wgContLang->convert( $nt->getText() );
- $plink = $skin->link( $nt, htmlspecialchars( $text ) );
+ $plink = Linker::link( $nt, htmlspecialchars( $text ) );
- $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
- return wfSpecialList( $plink, $nlinks );
+ $nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
+ return $this->getLanguage()->specialList( $plink, $nlinks );
}
}