(bug 13140) Show parent categories in category namespace
authorHuji <huji@users.mediawiki.org>
Mon, 25 Feb 2008 11:44:17 +0000 (11:44 +0000)
committerHuji <huji@users.mediawiki.org>
Mon, 25 Feb 2008 11:44:17 +0000 (11:44 +0000)
RELEASE-NOTES
includes/OutputPage.php

index 6298582..3d1ffe8 100644 (file)
@@ -38,6 +38,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 13115) rebuildrecentchanges should print the current value of $wgRCMaxAge
 * (bug 13132) Unable to unprotect pages protected with earlier versions of MediaWiki
 * (bug 13137) Bots to edit protected pages
+* (bug 13140) Show parent categories in category namespace
 
 === API changes in 1.13 ===
 
index f152fac..d39b80c 100644 (file)
@@ -271,7 +271,7 @@ class OutputPage {
         * Add an array of categories, with names in the keys
         */
        public function addCategoryLinks( $categories ) {
-               global $wgUser, $wgContLang;
+               global $wgUser, $wgContLang, $wgTitle;
 
                if ( !is_array( $categories ) ) {
                        return;
@@ -298,7 +298,7 @@ class OutputPage {
 
                # Remove categories with hiddencat
                foreach ( $res as $row ) {
-                       if ( isset( $row->pp_value ) ) {
+                       if ( isset( $row->pp_value ) and $wgTitle->getNamespace() != NS_CATEGORY ) {
                                unset( $categories[$row->page_title] );
                        }
                }