Merge "Revert "[MCR] Add and use $title param to RevisionStore getPrevious/Next""
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 29 Dec 2017 10:28:24 +0000 (10:28 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 29 Dec 2017 10:28:25 +0000 (10:28 +0000)
1  2 
includes/Storage/RevisionStore.php

@@@ -32,7 -32,7 +32,7 @@@ use Content
  use ContentHandler;
  use DBAccessObjectUtils;
  use Hooks;
 -use \IDBAccessObject;
 +use IDBAccessObject;
  use InvalidArgumentException;
  use IP;
  use LogicException;
@@@ -1678,14 -1678,11 +1678,11 @@@ class RevisionStore implements IDBAcces
         * MCR migration note: this replaces Revision::getPrevious
         *
         * @param RevisionRecord $rev
-        * @param Title $title if known (optional)
         *
         * @return RevisionRecord|null
         */
-       public function getPreviousRevision( RevisionRecord $rev, Title $title = null ) {
-               if ( $title === null ) {
-                       $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
-               }
+       public function getPreviousRevision( RevisionRecord $rev ) {
+               $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
                $prev = $title->getPreviousRevisionID( $rev->getId() );
                if ( $prev ) {
                        return $this->getRevisionByTitle( $title, $prev );
         * MCR migration note: this replaces Revision::getNext
         *
         * @param RevisionRecord $rev
-        * @param Title $title if known (optional)
         *
         * @return RevisionRecord|null
         */
-       public function getNextRevision( RevisionRecord $rev, Title $title = null ) {
-               if ( $title === null ) {
-                       $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
-               }
+       public function getNextRevision( RevisionRecord $rev ) {
+               $title = $this->getTitle( $rev->getPageId(), $rev->getId() );
                $next = $title->getNextRevisionID( $rev->getId() );
                if ( $next ) {
                        return $this->getRevisionByTitle( $title, $next );