*/
function replaceLinkHolders( &$text, $options = 0 ) {
global $wgUser, $wgLinkCache, $wgUseOldExistenceCheck, $wgLinkHolders;
+ global $wgInterwikiLinkHolders;
+ global $outputReplace;
if ( $wgUseOldExistenceCheck ) {
return array();
# Construct search and replace arrays
wfProfileIn( $fname.'-construct' );
- global $outputReplace;
$outputReplace = array();
foreach ( $wgLinkHolders['namespaces'] as $key => $ns ) {
$pdbk = $pdbks[$key];
"outputReplaceMatches",
$text);
wfProfileOut( $fname.'-replace' );
+ }
+ if ( !empty( $wgInterwikiLinkHolders ) ) {
wfProfileIn( $fname.'-interwiki' );
- global $wgInterwikiLinkHolders;
$outputReplace = $wgInterwikiLinkHolders;
$text = preg_replace_callback(
'/<!--IWLINK (.*?)-->/',