From: Brion Vibber Date: Sun, 18 Apr 2010 00:39:12 +0000 (+0000) Subject: Cleanup for bugs in r65104 (iwlinks table), that'll teach me not to commit at 4am... X-Git-Tag: 1.31.0-rc.0~37071 X-Git-Url: http://git.cyclocoop.org/%27.%28%24current%20%3E%202?a=commitdiff_plain;h=e1d14043720e210dd5117ad882b5b8c4383fa425;p=lhc%2Fweb%2Fwiklou.git Cleanup for bugs in r65104 (iwlinks table), that'll teach me not to commit at 4am after drinking with the wikimedia devs! --- diff --git a/includes/parser/LinkHolderArray.php b/includes/parser/LinkHolderArray.php index 3fa88bca8f..00e5ef5b97 100644 --- a/includes/parser/LinkHolderArray.php +++ b/includes/parser/LinkHolderArray.php @@ -162,9 +162,6 @@ class LinkHolderArray { # 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 ); @@ -269,9 +266,11 @@ class LinkHolderArray { 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 ); diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 2b9cbefda8..8a59b65bc0 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1830,7 +1830,7 @@ class Parser { # # 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 { diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index 4c259f2fe9..9cbcfee599 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -105,7 +105,6 @@ class ParserOutput * @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 );