BUG#1131 Fix headings containing interwiki links
authorJens Frank <jeluf@users.mediawiki.org>
Sat, 22 Jan 2005 09:34:56 +0000 (09:34 +0000)
committerJens Frank <jeluf@users.mediawiki.org>
Sat, 22 Jan 2005 09:34:56 +0000 (09:34 +0000)
includes/Parser.php

index 08d9152..e5ed2f3 100644 (file)
@@ -2376,7 +2376,7 @@ class Parser
         * @access private
         */
        /* private */ function formatHeadings( $text, $isMain=true ) {
-               global $wgInputEncoding, $wgMaxTocLevel, $wgContLang, $wgLinkHolders;
+               global $wgInputEncoding, $wgMaxTocLevel, $wgContLang, $wgLinkHolders, $wgInterwikiLinkHolders;
 
                $doNumberHeadings = $this->mOptions->getNumberHeadings();
                $doShowToc = $this->mOptions->getShowToc();
@@ -2540,6 +2540,9 @@ class Parser
                        $canonized_headline = preg_replace( '/<!--LINK ([0-9]*)-->/e',
                                                            "\$wgLinkHolders['texts'][\$1]",
                                                            $canonized_headline );
+                       $canonized_headline = preg_replace( '/<!--IWLINK ([0-9]*)-->/e',
+                                                           "\$wgInterwikiLinkHolders[\$1]",
+                                                           $canonized_headline );
 
                        # strip out HTML
                        $canonized_headline = preg_replace( '/<.*?' . '>/','',$canonized_headline );