http://www.mediawiki.org/wiki/Special:Code/MediaWiki/59730
Revision: 59730 Author: demon Date: 2009-12-04 13:15:11 +0000 (Fri, 04 Dec 2009) Log Message: ----------- (bug 15853) Feeds for non-existing pages returned a feed of all pages where rev_page = 0. In theory of course this should never happen, but it does. Conveniently this started returning a nice "page does not exist" error in the feed. Patch by Mormegil. Modified Paths: -------------- trunk/phase3/RELEASE-NOTES trunk/phase3/includes/HistoryPage.php Modified: trunk/phase3/RELEASE-NOTES =================================================================== --- trunk/phase3/RELEASE-NOTES 2009-12-04 12:00:53 UTC (rev 59729) +++ trunk/phase3/RELEASE-NOTES 2009-12-04 13:15:11 UTC (rev 59730) @@ -665,6 +665,8 @@ due to an infinite loop of job requeues. * (bug 21523) File that can have multiple pages (djvu, pdf, ...) no longer have the page selector when they have only one page +* (bug 15853) Feeds for non-existing pages returned a feed of all pages where + rev_page = 0 == API changes in 1.16 == Modified: trunk/phase3/includes/HistoryPage.php =================================================================== --- trunk/phase3/includes/HistoryPage.php 2009-12-04 12:00:53 UTC (rev 59729) +++ trunk/phase3/includes/HistoryPage.php 2009-12-04 13:15:11 UTC (rev 59730) @@ -182,6 +182,12 @@ * used by the main UI but that's now handled by the pager. */ function fetchRevisions($limit, $offset, $direction) { + + // Fail if article doesn't exist. + if( !$this->mTitle || !$this->mTitle->exists() ) { + return array(); + } + $dbr = wfGetDB( DB_SLAVE ); if( $direction == HistoryPage::DIR_PREV ) _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs