From f4fa02f786afb98caca75b7b5521fde2809c3eca Mon Sep 17 00:00:00 2001 From: Jens Frank Date: Tue, 1 Jun 2004 22:06:56 +0000 Subject: [PATCH] Use title object so that _ will be rendered as space --- includes/SpecialCategories.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/SpecialCategories.php b/includes/SpecialCategories.php index 34ebc6a832..6cc493e7cc 100644 --- a/includes/SpecialCategories.php +++ b/includes/SpecialCategories.php @@ -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() ); } } -- 2.20.1