X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FRevision.php;h=de3c2998b57128f31357ed01fa224ee2ef6e1881;hb=3bdc11bfc86df5fc0fe22e1b3b7d58d6a031bc2c;hp=f2ca79ae1564edfe304021095a4107a84982454d;hpb=333eaea7f7bf2d7dcaed1e9da62477a5245cfc72;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Revision.php b/includes/Revision.php index f2ca79ae15..de3c2998b5 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -330,7 +330,7 @@ class Revision implements IDBAccessObject { */ public static function pageJoinCond() { wfDeprecated( __METHOD__, '1.31' ); - return [ 'INNER JOIN', [ 'page_id = rev_page' ] ]; + return [ 'JOIN', [ 'page_id = rev_page' ] ]; } /** @@ -1008,9 +1008,8 @@ class Revision implements IDBAccessObject { * @return Revision|null */ public function getPrevious() { - $title = $this->getTitle(); - $rec = self::getRevisionLookup()->getPreviousRevision( $this->mRecord, $title ); - return $rec ? new Revision( $rec, self::READ_NORMAL, $title ) : null; + $rec = self::getRevisionLookup()->getPreviousRevision( $this->mRecord ); + return $rec ? new Revision( $rec, self::READ_NORMAL, $this->getTitle() ) : null; } /** @@ -1019,9 +1018,8 @@ class Revision implements IDBAccessObject { * @return Revision|null */ public function getNext() { - $title = $this->getTitle(); - $rec = self::getRevisionLookup()->getNextRevision( $this->mRecord, $title ); - return $rec ? new Revision( $rec, self::READ_NORMAL, $title ) : null; + $rec = self::getRevisionLookup()->getNextRevision( $this->mRecord ); + return $rec ? new Revision( $rec, self::READ_NORMAL, $this->getTitle() ) : null; } /** @@ -1256,13 +1254,13 @@ class Revision implements IDBAccessObject { /** * Get rev_timestamp from rev_id, without loading the rest of the row * - * @param Title $title + * @param Title $title (ignored since 1.34) * @param int $id * @param int $flags * @return string|bool False if not found */ static function getTimestampFromId( $title, $id, $flags = 0 ) { - return self::getRevisionStore()->getTimestampFromId( $title, $id, $flags ); + return self::getRevisionStore()->getTimestampFromId( $id, $flags ); } /**