More interwiki mucking around -- isLocal() is not the opposite of isExternal()\!
This commit is contained in:
parent
d09014afc1
commit
9acfb88be7
2 changed files with 4 additions and 8 deletions
|
|
@ -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 = '<!--IWLINK '. ($nr-1) ."-->{$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 = '<!--LINK '. ($nr-1) ."-->{$trail}";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue