From 51955440616136d6f9b47cf7d42868deb214b376 Mon Sep 17 00:00:00 2001 From: Dereckson Date: Fri, 16 Nov 2012 02:01:36 +0100 Subject: [PATCH] (bug 42173) Standardize categories special pages output This change removes namespace prefix from [[Special:UncategorizedCategories]], so the output is consistent with the other categories pages. Change-Id: I033e570754ca81be900a1f5482b8429583ab9172 --- RELEASE-NOTES-1.21 | 1 + .../specials/SpecialUncategorizedcategories.php | 13 +++++++++++++ 2 files changed, 14 insertions(+) diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21 index 16c978dba7..fec5be6d7a 100644 --- a/RELEASE-NOTES-1.21 +++ b/RELEASE-NOTES-1.21 @@ -71,6 +71,7 @@ production. actually sorted. * (bug 2865) User interface HTML elements don't use lang attribute (completed the fix by adding the lang attribute to firstHeading) +* (bug 42173) Removed namespace prefixes on Special:UncategorizedCategories. === API changes in 1.21 === * prop=revisions can now report the contentmodel and contentformat, see docs/contenthandler.txt diff --git a/includes/specials/SpecialUncategorizedcategories.php b/includes/specials/SpecialUncategorizedcategories.php index 70d98df92b..d2d91bdbc5 100644 --- a/includes/specials/SpecialUncategorizedcategories.php +++ b/includes/specials/SpecialUncategorizedcategories.php @@ -31,4 +31,17 @@ class UncategorizedCategoriesPage extends UncategorizedPagesPage { parent::__construct( $name ); $this->requestedNamespace = NS_CATEGORY; } + + /** + * Formats the result + * @param $skin The current skin + * @param $result The query result + * @return string The category link + */ + function formatResult ( $skin, $result ) { + $title = Title::makeTitle( NS_CATEGORY, $result->title ); + $text = $title->getText(); + + return Linker::linkKnown( $title, htmlspecialchars( $text ) ); + } } -- 2.20.1