summaryrefslogtreecommitdiff
path: root/includes/SpecialMostcategories.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
committerPierre Schmitz <pierre@archlinux.de>2007-01-11 19:06:07 +0000
commita58285fd06c8113c45377c655dd43cef6337e815 (patch)
treedfe31d3d12652352fe44890b4811eda0728faefb /includes/SpecialMostcategories.php
parent20194986f6638233732ba1fc3e838f117d3cc9ea (diff)
Aktualisierung auf MediaWiki 1.9.0
Diffstat (limited to 'includes/SpecialMostcategories.php')
-rw-r--r--includes/SpecialMostcategories.php21
1 files changed, 6 insertions, 15 deletions
diff --git a/includes/SpecialMostcategories.php b/includes/SpecialMostcategories.php
index c0d662cc..41bfb0cd 100644
--- a/includes/SpecialMostcategories.php
+++ b/includes/SpecialMostcategories.php
@@ -20,7 +20,7 @@ class MostcategoriesPage extends QueryPage {
function getSQL() {
$dbr =& wfGetDB( DB_SLAVE );
- extract( $dbr->tableNames( 'categorylinks', 'page' ) );
+ list( $categorylinks, $page) = $dbr->tableNamesN( 'categorylinks', 'page' );
return
"
SELECT
@@ -37,20 +37,11 @@ class MostcategoriesPage extends QueryPage {
}
function formatResult( $skin, $result ) {
- global $wgContLang, $wgLang;
-
- $nt = Title::makeTitle( $result->namespace, $result->title );
- $text = $wgContLang->convert( $nt->getPrefixedText() );
-
- $plink = $skin->makeKnownLink( $nt->getPrefixedText(), $text );
-
- $nl = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ),
- $wgLang->formatNum( $result->value ) );
-
- $nlink = $skin->makeKnownLink( $wgContLang->specialPage( 'Categories' ),
- $nl, 'article=' . $nt->getPrefixedURL() );
-
- return wfSpecialList($plink, $nlink);
+ global $wgLang;
+ $title = Title::makeTitleSafe( $result->namespace, $result->title );
+ $count = wfMsgExt( 'ncategories', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->value ) );
+ $link = $skin->makeKnownLinkObj( $title, $title->getText() );
+ return wfSpecialList( $link, $count );
}
}