Use title object so that _ will be rendered as space
authorJens Frank <jeluf@users.mediawiki.org>
Tue, 1 Jun 2004 22:06:56 +0000 (22:06 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Tue, 1 Jun 2004 22:06:56 +0000 (22:06 +0000)
includes/SpecialCategories.php

index 34ebc6a..6cc493e 100644 (file)
@@ -13,7 +13,7 @@ class CategoriesPage extends QueryPage {
        }
 
        function getSQL() {
-               $NScat = Namespace::getCategory();
+               $NScat = NS_CATEGORY;
                return "SELECT DISTINCT 'Categories' as type, 
                                {$NScat} as namespace,
                                cl_to as title,
@@ -27,7 +27,8 @@ class CategoriesPage extends QueryPage {
 
        function formatResult( $skin, $result ) {
                global $wgLang;
-               return $skin->makeLink( $wgLang->getNsText( NS_CATEGORY ).":".$result->title, $result->title );
+               $title = Title::makeTitle( NS_CATEGORY, $result->title );
+               return $skin->makeLinkObj( $title, $title->getText() );
        }
 }