Follow-up to r45174: (bug 16806) Fix regression from r44524 that caused links to...
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 1 Jan 2009 00:05:08 +0000 (00:05 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 1 Jan 2009 00:05:08 +0000 (00:05 +0000)
commitc5d575e091daa884761c820e3bbf700b9e69d3d5
tree899aa31cda028da9a5d371fc80952c47fe441cd9
parent49105885dcd170e9b7d7b86ef9a7645de860a42f
Follow-up to r45174: (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.

Fixes other cases broken by Parser's assumptions failing to hold after change in Title::isAlwaysKnown()'s behavior:
* Links to invalid Special: pages were being recorded, but shouldn't
* Links to valid MediaWiki: pages were no longer recorded

Instead of the NS_FILE special-case in r45174, I'm just tossing *all* isAlwaysKnown links over to ParserOutput::addLink(), and letting the latter worry about what types of titles it won't record.
Just for good measure, in case any NS_MEDIA titles make it into ParserOutput::addLink() they'll be normalized to NS_FILE.
includes/parser/Parser.php
includes/parser/ParserOutput.php