Skip to content

Commit

Permalink
In #ifexist: add the link to the parser output even if it's in the li…
Browse files Browse the repository at this point in the history
…nk cache already
  • Loading branch information
Tim Starling committed Sep 26, 2008
1 parent b1dc278 commit 7f9f5c5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ParserFunctions.php
Original file line number Diff line number Diff line change
Expand Up @@ -361,9 +361,11 @@ function ifexistCommon( &$parser, $frame, $title = '', $then = '', $else = '' )
if ( !$this->incrementIfexistCount( $parser, $frame ) ) {
return $else;
}
if ( $lc->getGoodLinkID( $pdbk ) ) {
if ( 0 != ( $id = $lc->getGoodLinkID( $pdbk ) ) ) {
$parser->mOutput->addLink( $title, $id );
return $then;
} elseif ( $lc->isBadLink( $pdbk ) ) {
$parser->mOutput->addLink( $title, 0 );
return $else;
}
$id = $title->getArticleID();
Expand Down

0 comments on commit 7f9f5c5

Please sign in to comment.