Find variant link of categories, to fix some strange bugs in Chinese Wikipedia.
authorPhilip Tzou <philip@users.mediawiki.org>
Fri, 23 Jan 2009 09:32:41 +0000 (09:32 +0000)
committerPhilip Tzou <philip@users.mediawiki.org>
Fri, 23 Jan 2009 09:32:41 +0000 (09:32 +0000)
includes/OutputPage.php
languages/LanguageConverter.php

index 1386730..e4d32af 100644 (file)
@@ -409,6 +409,7 @@ class OutputPage {
                        $sk = $wgUser->getSkin();
                        foreach ( $categories as $category => $type ) {
                                $title = Title::makeTitleSafe( NS_CATEGORY, $category );
+                               $wgContLang->findVariantLink( $category, $title );
                                $text = $wgContLang->convertHtml( $title->getText() );
                                $this->mCategoryLinks[$type][] = $sk->makeLinkObj( $title, $text );
                        }
index 504fc95..bc27d41 100644 (file)
@@ -199,7 +199,7 @@ class LanguageConverter {
        }
        
        /**
-        * caption convert, base on preg_replace_callback
+        * caption convert, base on preg_replace
         *
         * to convert text in "title" or "alt", like '<img alt="text" ... '
         * or '<span title="text" ... '