EventDispatcher: Read revision IDs to compare from master

Bug: T284175
Change-Id: Iec99ea0afc659969108104cf5b2627856711544d
This commit is contained in:
Bartosz Dziewoński 2021-06-02 21:12:16 +02:00
parent 9c8d709b8a
commit 4353b68646

View file

@ -14,6 +14,7 @@ use DOMElement;
use EchoEvent;
use Error;
use FauxRequest;
use IDBAccessObject;
use Iterator;
use MediaWiki\Extension\DiscussionTools\CommentParser;
use MediaWiki\Extension\DiscussionTools\Hooks\HookUtils;
@ -67,7 +68,7 @@ class EventDispatcher {
$revisionStore = $services->getRevisionStore();
$userFactory = $services->getUserFactory();
$oldRevRecord = $revisionStore->getPreviousRevision( $newRevRecord );
$oldRevRecord = $revisionStore->getPreviousRevision( $newRevRecord, IDBAccessObject::READ_LATEST );
if ( $oldRevRecord === null ) {
// TODO: Handle page creation (oldRevRecord = null?)