From: Alex Z Date: Tue, 30 Dec 2008 05:34:37 +0000 (+0000) Subject: (bug 16806) Fix regression from r44524 that caused links to files to not get added... X-Git-Tag: 1.31.0-rc.0~43702 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=caa5d0d189193bfd71a9026682d841362553eb9c;p=lhc%2Fweb%2Fwiklou.git (bug 16806) Fix regression from r44524 that caused links to files to not get added to mLinks in ParserOutput, which caused them to not be included in LinksUpdate::LinksUpdate(), and not added to pagelinks. --- diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 4427a0111f..a2f9b9a6de 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1843,6 +1843,11 @@ 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() ) { + # Need to add file links to parser output here or else they won't end up + # in the pagelinks table later + if( $ns == NS_FILE ) { + $this->mOutput->addLink( $nt ); + } $s .= $this->makeKnownLinkHolder( $nt, $text, '', $trail, $prefix ); } else { $s .= $holders->makeHolder( $nt, $text, '', $trail, $prefix );