From a58285fd06c8113c45377c655dd43cef6337e815 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 11 Jan 2007 19:06:07 +0000 Subject: Aktualisierung auf MediaWiki 1.9.0 --- includes/SpecialMostcategories.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'includes/SpecialMostcategories.php') 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 ); } } -- cgit v1.2.3-54-g00ecf