From 5a502478246c435f7a0672ea63ddf67eb22a412d Mon Sep 17 00:00:00 2001 From: Huji Date: Mon, 25 Feb 2008 11:44:17 +0000 Subject: [PATCH] (bug 13140) Show parent categories in category namespace --- RELEASE-NOTES | 1 + includes/OutputPage.php | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 62985827d7..3d1ffe8d8a 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/OutputPage.php b/includes/OutputPage.php index f152fac8d3..d39b80ca80 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -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] ); } } -- 2.20.1