* Fix namespaces in category list.
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 28 Jun 2005 04:51:15 +0000 (04:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 28 Jun 2005 04:51:15 +0000 (04:51 +0000)
RELEASE-NOTES
includes/CategoryPage.php

index 81e378a..dbb39d2 100644 (file)
@@ -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 ===
index d7a1b40..20e38dc 100644 (file)
@@ -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 ) ) );
                        }
                }