From 9acfb88be75ded0229efe56fc84ec89fdb030ef7 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sun, 26 Jun 2005 13:38:43 +0000 Subject: [PATCH] More interwiki mucking around -- isLocal() is not the opposite of isExternal()\! --- includes/Parser.php | 6 +++--- includes/Title.php | 6 +----- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/includes/Parser.php b/includes/Parser.php index ebed5d52af..a0bdcd5ceb 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -1426,7 +1426,7 @@ class Parser $s .= $prefix . $sk->makeKnownLinkObj( $nt, $text, '', $trail ); continue; } - if( $nt->isLocal() && $nt->isAlwaysKnown() ) { + if( !$nt->isExternal() && $nt->isAlwaysKnown() ) { /** * Skip lookups for special pages and self-links. * External interwiki links are not included here because @@ -1464,14 +1464,14 @@ class Parser if ( $nt->isExternal() ) { $nr = array_push( $this->mInterwikiLinkHolders['texts'], $prefix.$text.$inside ); - $this->mInterwikiLinkHolders['titles'][] =& $nt; + $this->mInterwikiLinkHolders['titles'][] = $nt; $retVal = '{$trail}"; } else { $nr = array_push( $this->mLinkHolders['namespaces'], $nt->getNamespace() ); $this->mLinkHolders['dbkeys'][] = $nt->getDBkey(); $this->mLinkHolders['queries'][] = $query; $this->mLinkHolders['texts'][] = $prefix.$text.$inside; - $this->mLinkHolders['titles'][] =& $nt; + $this->mLinkHolders['titles'][] = $nt; $retVal = '{$trail}"; } diff --git a/includes/Title.php b/includes/Title.php index 4f98258ed8..a294343d98 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1991,13 +1991,9 @@ class Title { * this category. Special pages never exist in the database. Some images do not * have description pages in the database, but the description page contains * useful history information that the user may want to link to. - * - * Interwiki links are not in this category because of icky pass-interaction - * issues. Anything containing http:// gets mangled later. Local URLs use - * relative paths. */ function isAlwaysKnown() { - return ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) + return $this->isExternal() || ( 0 == $this->mNamespace && "" == $this->mDbkeyform ) || NS_SPECIAL == $this->mNamespace || NS_IMAGE == $this->mNamespace; } -- 2.20.1