Merge "(bug 15853) Wrong entries in history feed"
authorSiebrand <s.mazeland@xs4all.nl>
Fri, 15 Jun 2012 13:02:02 +0000 (13:02 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 15 Jun 2012 13:02:02 +0000 (13:02 +0000)
includes/actions/HistoryAction.php

index 94bf50c..50d210f 100644 (file)
@@ -204,6 +204,11 @@ class HistoryAction extends FormlessAction {
         * @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 ) {