(bug 22310) Only need to declare $join_conds once
[lhc/web/wiklou.git] / includes / CategoryPage.php
index 0a1d217..362fbde 100644 (file)
@@ -86,7 +86,7 @@ class CategoryViewer {
         * @private
         */
        function getHTML() {
-               global $wgOut, $wgCategoryMagicGallery, $wgCategoryPagingLimit;
+               global $wgOut, $wgCategoryMagicGallery, $wgCategoryPagingLimit, $wgContLang;
                wfProfileIn( __METHOD__ );
 
                $this->showGallery = $wgCategoryMagicGallery && !$wgOut->mNoGallery;
@@ -118,7 +118,7 @@ class CategoryViewer {
                }
 
                wfProfileOut( __METHOD__ );
-               return $r;
+               return $wgContLang->convert($r);
        }
 
        function clearCategoryState() {
@@ -153,11 +153,10 @@ class CategoryViewer {
         * @deprecated kept for compatibility, please use addSubcategoryObject instead
         */
        function addSubcategory( $title, $sortkey, $pageLength ) {
-               global $wgContLang;
                // Subcategory; strip the 'Category' namespace from the link text.
                $this->children[] = $this->getSkin()->link(
                        $title,
-                       $wgContLang->convertHtml( $title->getText() ),
+                       null,
                        array(),
                        array(),
                        array( 'known', 'noclasses' )
@@ -205,17 +204,16 @@ class CategoryViewer {
         */
        function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) {
                global $wgContLang;
-               $titletext = $wgContLang->convertHtml( $title->getPrefixedText() );
                $this->articles[] = $isRedirect
                        ? '<span class="redirect-in-category">' .
                                $this->getSkin()->link(
                                        $title,
-                                       $titletext,
+                                       null,
                                        array(),
                                        array(),
                                        array( 'known', 'noclasses' )
                                ) . '</span>'
-                       : $this->getSkin()->makeSizeLinkObj( $pageLength, $title, $titletext );
+                       : $this->getSkin()->makeSizeLinkObj( $pageLength, $title );
                $this->articles_start_char[] = $wgContLang->convert( $wgContLang->firstChar( $sortkey ) );
        }