From ac77eb5b2c4104fec0ee289d44031c26982934cb Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 13 Nov 2004 14:24:42 +0000 Subject: [PATCH] Fixed bug causing interwiki links to disappear unless accompanied by an internal link --- includes/Parser.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index e7bbb39aa1..4ee535aad0 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2852,6 +2852,8 @@ class Parser */ function replaceLinkHolders( &$text, $options = 0 ) { global $wgUser, $wgLinkCache, $wgUseOldExistenceCheck, $wgLinkHolders; + global $wgInterwikiLinkHolders; + global $outputReplace; if ( $wgUseOldExistenceCheck ) { return array(); @@ -2944,7 +2946,6 @@ class Parser # Construct search and replace arrays wfProfileIn( $fname.'-construct' ); - global $outputReplace; $outputReplace = array(); foreach ( $wgLinkHolders['namespaces'] as $key => $ns ) { $pdbk = $pdbks[$key]; @@ -2976,9 +2977,10 @@ class Parser "outputReplaceMatches", $text); wfProfileOut( $fname.'-replace' ); + } + if ( !empty( $wgInterwikiLinkHolders ) ) { wfProfileIn( $fname.'-interwiki' ); - global $wgInterwikiLinkHolders; $outputReplace = $wgInterwikiLinkHolders; $text = preg_replace_callback( '//', -- 2.20.1