(bug 42173) Standardize categories special pages output
authorDereckson <dereckson@espace-win.org>
Fri, 16 Nov 2012 01:01:36 +0000 (02:01 +0100)
committerDereckson <dereckson@espace-win.org>
Fri, 16 Nov 2012 10:43:38 +0000 (11:43 +0100)
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
includes/specials/SpecialUncategorizedcategories.php

index 16c978d..fec5be6 100644 (file)
@@ -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
index 70d98df..d2d91bd 100644 (file)
@@ -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 ) );
+        }
 }