(bug 15853) Feeds for non-existing pages returned a feed of all pages where rev_page...
authorChad Horohoe <demon@users.mediawiki.org>
Fri, 4 Dec 2009 13:15:11 +0000 (13:15 +0000)
committerChad Horohoe <demon@users.mediawiki.org>
Fri, 4 Dec 2009 13:15:11 +0000 (13:15 +0000)
RELEASE-NOTES
includes/HistoryPage.php

index 7530fc7..b8871e4 100644 (file)
@@ -665,6 +665,8 @@ Hopefully we will remove this configuration var soon)
   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 ==
 
index ebbc400..dbe2e0a 100644 (file)
@@ -182,6 +182,12 @@ class HistoryPage {
         * 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 )