From: Brion Vibber Date: Tue, 28 Jun 2005 04:51:15 +0000 (+0000) Subject: * Fix namespaces in category list. X-Git-Tag: 1.5.0beta2~171 X-Git-Url: http://git.cyclocoop.org/fichier?a=commitdiff_plain;h=b37db6528f7052ca83a2255154268b16bead730b;p=lhc%2Fweb%2Fwiklou.git * Fix namespaces in category list. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 81e378a764..dbb39d2ebd 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -393,6 +393,7 @@ Various bugfixes, small features, and a few experimental things: * Fixed a bug where the watchlist count without talk pages would be off by a factor of two. * upgrade1_5.php uses insert ignore, allows to skip image info initialization +* Fix namespaces in category list. === Caveats === diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index d7a1b40e5b..20e38dc0a8 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -117,7 +117,7 @@ class CategoryPage extends Article { if( $title->getNamespace() == NS_CATEGORY ) { // Subcategory; strip the 'Category' namespace from the link text. - array_push( $children, $sk->makeKnownLinkObj( $title, $wgContLang->convert( $title->getText() ) ) ); + array_push( $children, $sk->makeKnownLinkObj( $title, $wgContLang->convert( $title->getPrefixedText() ) ) ); // If there's a link from Category:A to Category:B, the sortkey of the resulting // entry in the categorylinks table is Category:A, not A, which it SHOULD be. @@ -139,7 +139,7 @@ class CategoryPage extends Article { } } else { // Page in this category - array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $title, $wgContLang->convert( $title->getText() ) ) ) ; + array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ; array_push( $articles_start_char, $wgContLang->convert( $wgContLang->firstChar( $x->cl_sortkey ) ) ); } }