X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FRevision.php;h=c6e727e69b8095fa73baa8f860c81e73578e4ea6;hp=cbaff90d6972e62c936713c7b24fe13d3c05695e;hb=e390198c4e4be7632b01173e42050061f1cc346a;hpb=90f5b55fa48a719905e828dbf731b078e71f6374 diff --git a/includes/Revision.php b/includes/Revision.php index cbaff90d69..c6e727e69b 100644 --- a/includes/Revision.php +++ b/includes/Revision.php @@ -89,6 +89,7 @@ class Revision implements IDBAccessObject { * @return SqlBlobStore */ protected static function getBlobStore( $wiki = false ) { + // @phan-suppress-next-line PhanAccessMethodInternal $store = MediaWikiServices::getInstance() ->getBlobStoreFactory() ->newSqlBlobStore( $wiki ); @@ -1008,9 +1009,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 +1019,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 +1255,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 ); } /**