From cd4d2fb4a7ed491670525eff440728ec5a75f0f9 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 22 Dec 2004 07:32:29 +0000 Subject: [PATCH] Fix interwiki links in history comments (merged from REL1_4) --- includes/Linker.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) 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 ); -- 2.20.1