X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2FRevision%2FRevisionLookup.php;h=17cafc6a5d745c5254183173b70eeef507830509;hp=db6c7c30b4f6261a067dd408ee2e1c0aac074d78;hb=a3cd158d8433e41cbeb299f0e268dfef363b2afd;hpb=cc814cae886eaab6785b4942d40fe585d32f3319 diff --git a/includes/Revision/RevisionLookup.php b/includes/Revision/RevisionLookup.php index db6c7c30b4..17cafc6a5d 100644 --- a/includes/Revision/RevisionLookup.php +++ b/includes/Revision/RevisionLookup.php @@ -85,11 +85,12 @@ interface RevisionLookup extends IDBAccessObject { * MCR migration note: this replaces Revision::getPrevious * * @param RevisionRecord $rev - * @param Title|null $title if known (optional) + * @param int $flags (optional) $flags include: + * IDBAccessObject::READ_LATEST: Select the data from the master * * @return RevisionRecord|null */ - public function getPreviousRevision( RevisionRecord $rev, Title $title = null ); + public function getPreviousRevision( RevisionRecord $rev, $flags = 0 ); /** * Get next revision for this title @@ -97,11 +98,24 @@ interface RevisionLookup extends IDBAccessObject { * MCR migration note: this replaces Revision::getNext * * @param RevisionRecord $rev - * @param Title|null $title if known (optional) + * @param int $flags (optional) $flags include: + * IDBAccessObject::READ_LATEST: Select the data from the master * * @return RevisionRecord|null */ - public function getNextRevision( RevisionRecord $rev, Title $title = null ); + public function getNextRevision( RevisionRecord $rev, $flags = 0 ); + + /** + * Get rev_timestamp from rev_id, without loading the rest of the row. + * + * MCR migration note: this replaces Revision::getTimestampFromId + * + * @param int $id + * @param int $flags + * @return string|bool False if not found + * @since 1.34 (present earlier in RevisionStore) + */ + public function getTimestampFromId( $id, $flags = 0 ); /** * Load a revision based on a known page ID and current revision ID from the DB