# Check if it's a static known link, e.g. interwiki
if ( $title->isAlwaysKnown() ) {
$colours[$pdbk] = '';
- if( $title->getInterwiki() != '' ) {
- $output->addInterwikiLink( $title );
- }
} elseif ( ( $id = $linkCache->getGoodLinkID( $pdbk ) ) != 0 ) {
$colours[$pdbk] = $sk->getLinkColour( $title, $threshold );
$output->addLink( $title, $id );
wfProfileIn( __METHOD__ );
# Make interwiki link HTML
$sk = $this->parent->getOptions()->getSkin();
+ $output = $this->parent->getOutput();
$replacePairs = array();
foreach( $this->interwikis as $key => $link ) {
$replacePairs[$key] = $sk->link( $link['title'], $link['text'] );
+ $output->addInterwikiLink( $link['title'] );
}
$replacer = new HashtableReplacer( $replacePairs, 1 );
#
# FIXME: isAlwaysKnown() can be expensive for file links; we should really do
# batch file existence checks for NS_FILE and NS_MEDIA
- if ( $iw = '' && $nt->isAlwaysKnown() ) {
+ if ( $iw == '' && $nt->isAlwaysKnown() ) {
$this->mOutput->addLink( $nt );
$s .= $this->makeKnownLinkHolder( $nt, $text, '', $trail, $prefix );
} else {
* @param mixed $id optional known page_id so we can skip the lookup
*/
function addLink( $title, $id = null ) {
- wfDebug(__METHOD__ . " got: " . $title->getPrefixedText() . "\n");
if ( $title->isExternal() ) {
// Don't record interwikis in pagelinks
$this->addInterwikiLink( $title );