From: Brion Vibber Date: Wed, 22 Dec 2004 07:32:29 +0000 (+0000) Subject: Fix interwiki links in history comments (merged from REL1_4) X-Git-Tag: 1.5.0alpha1~1054 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=cd4d2fb4a7ed491670525eff440728ec5a75f0f9;p=lhc%2Fweb%2Fwiklou.git Fix interwiki links in history comments (merged from REL1_4) --- diff --git a/includes/Linker.php b/includes/Linker.php index 0b13506abc..3be567691a 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -169,12 +169,16 @@ class Linker { $trail = $m[2]; } } - # Assume $this->postParseLinkColour(). This prevents - # interwiki links from being parsed as external links. - global $wgInterwikiLinkHolders; $t = "{$text}{$inside}"; - $nr = array_push($wgInterwikiLinkHolders, $t); - $retVal = '{$trail}"; + if( $this->postParseLinkColour ) { + # There's no existence check, but this will prevent + # interwiki links from being parsed as external links. + global $wgInterwikiLinkHolders; + $nr = array_push($wgInterwikiLinkHolders, $t); + $retVal = '{$trail}"; + } else { + return $t; + } } elseif ( 0 == $ns && "" == $dbkey ) { # A self-link with a fragment; skip existence check. $retVal = $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );