The history feed for a non-existing page fetched revisions for
rev_page=0. Even though there should be none in the database,
there obviously are, which means such feeds are full of spurious
entries.
Added an existence check, fetchRevisions now returns an empty result
for non-existent pages, which is (and has always been) handled
gracefully in feed() by emitting feedEmpty().
Change-Id: Iae892d900239030bc249c829faecb1bcb3672db2
* @return ResultWrapper
*/
function fetchRevisions( $limit, $offset, $direction ) {
+ // Fail if article doesn't exist.
+ if( !$this->getTitle()->exists() ) {
+ return new FakeResultWrapper( array() );
+ }
+
$dbr = wfGetDB( DB_SLAVE );
if ( $direction == HistoryPage::DIR_PREV ) {