mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-23 23:44:53 +00:00
Clean up Title deprecated methods
Replace hard deprecated getPreviousRevisionID method with RevisionLookup::getPreviousRevision method Bug: T274151 Change-Id: Ia6ec1a4765ba5849b53919a6e9d73df7e839f6ed
This commit is contained in:
parent
9ac3c667ba
commit
aac1986c3b
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
use MediaWiki\MediaWikiServices;
|
||||
|
||||
class EchoEditUserTalkPresentationModel extends EchoEventPresentationModel {
|
||||
|
||||
/**
|
||||
|
@ -106,7 +108,12 @@ class EchoEditUserTalkPresentationModel extends EchoEventPresentationModel {
|
|||
private function getRevBeforeFirstNotification() {
|
||||
$events = $this->getBundledEvents();
|
||||
$firstNotificationRevId = end( $events )->getExtraParam( 'revid' );
|
||||
return $this->event->getTitle()->getPreviousRevisionID( $firstNotificationRevId );
|
||||
$revisionLookup = MediaWikiServices::getInstance()->getRevisionLookup();
|
||||
$revisionRecord = $revisionLookup->getRevisionById( $firstNotificationRevId );
|
||||
$previousRevision = $revisionRecord ? $revisionLookup->getPreviousRevision( $revisionRecord ) : null;
|
||||
$oldRevisionID = $previousRevision ? $previousRevision->getId() : 0;
|
||||
|
||||
return $oldRevisionID;
|
||||
}
|
||||
|
||||
protected function getSubjectMessageKey() {
|
||||
|
|
Loading…
Reference in a new issue