From 183851b06bd6c52f3cae5375f433da720d410447 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Wed, 11 Oct 2006 18:12:39 +0000 Subject: MediaWiki 1.7.1 wiederhergestellt --- includes/SpecialCategories.php | 68 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 includes/SpecialCategories.php (limited to 'includes/SpecialCategories.php') diff --git a/includes/SpecialCategories.php b/includes/SpecialCategories.php new file mode 100644 index 00000000..8a6dd5ff --- /dev/null +++ b/includes/SpecialCategories.php @@ -0,0 +1,68 @@ +tableName( 'categorylinks' ); + $s= "SELECT 'Categories' as type, + {$NScat} as namespace, + cl_to as title, + 1 as value, + COUNT(*) as count + FROM $categorylinks + GROUP BY cl_to"; + return $s; + } + + function sortDescending() { + return false; + } + + function formatResult( $skin, $result ) { + global $wgLang; + $title = Title::makeTitle( NS_CATEGORY, $result->title ); + $plink = $skin->makeLinkObj( $title, $title->getText() ); + $nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape'), + $wgLang->formatNum( $result->count ) ); + return wfSpecialList($plink, $nlinks); + } +} + +/** + * + */ +function wfSpecialCategories() { + list( $limit, $offset ) = wfCheckLimits(); + + $cap = new CategoriesPage(); + + return $cap->doQuery( $offset, $limit ); +} + +?> -- cgit v1.2.2