From: Dereckson Date: Fri, 16 Nov 2012 01:01:36 +0000 (+0100) Subject: (bug 42173) Standardize categories special pages output X-Git-Tag: 1.31.0-rc.0~21613^2 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=51955440616136d6f9b47cf7d42868deb214b376;p=lhc%2Fweb%2Fwiklou.git (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 --- 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 ) ); + } }