mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Echo
synced 2024-11-27 17:20:40 +00:00
Swap uses of Title::GAID_FOR_UPDATE for IDBAccessObject::READ_LATEST
Deprecated in MediaWiki 1.34. Change-Id: I23732e29954d3410b22726a524c6e15b71b0d6a1
This commit is contained in:
parent
ac49cd6a9f
commit
34ffba5b03
|
@ -3,6 +3,7 @@
|
||||||
namespace MediaWiki\Extension\Notifications;
|
namespace MediaWiki\Extension\Notifications;
|
||||||
|
|
||||||
use Article;
|
use Article;
|
||||||
|
use IDBAccessObject;
|
||||||
use Language;
|
use Language;
|
||||||
use MediaWiki\Extension\Notifications\Hooks\HookRunner;
|
use MediaWiki\Extension\Notifications\Hooks\HookRunner;
|
||||||
use MediaWiki\Extension\Notifications\Model\Event;
|
use MediaWiki\Extension\Notifications\Model\Event;
|
||||||
|
@ -55,7 +56,7 @@ abstract class DiscussionParser {
|
||||||
$title = Title::newFromID( $revision->getPageId() );
|
$title = Title::newFromID( $revision->getPageId() );
|
||||||
// use the primary database for new page
|
// use the primary database for new page
|
||||||
} else {
|
} else {
|
||||||
$title = Title::newFromID( $revision->getPageId(), Title::GAID_FOR_UPDATE );
|
$title = Title::newFromID( $revision->getPageId(), IDBAccessObject::READ_LATEST );
|
||||||
}
|
}
|
||||||
|
|
||||||
// not a valid title
|
// not a valid title
|
||||||
|
|
|
@ -3,6 +3,7 @@
|
||||||
namespace MediaWiki\Extension\Notifications\Model;
|
namespace MediaWiki\Extension\Notifications\Model;
|
||||||
|
|
||||||
use Exception;
|
use Exception;
|
||||||
|
use IDBAccessObject;
|
||||||
use InvalidArgumentException;
|
use InvalidArgumentException;
|
||||||
use MediaWiki\Extension\Notifications\Bundleable;
|
use MediaWiki\Extension\Notifications\Bundleable;
|
||||||
use MediaWiki\Extension\Notifications\Controller\NotificationController;
|
use MediaWiki\Extension\Notifications\Controller\NotificationController;
|
||||||
|
@ -294,7 +295,7 @@ class Event extends AbstractEntity implements Bundleable {
|
||||||
$title = Title::newFromID( $targetPageId );
|
$title = Title::newFromID( $targetPageId );
|
||||||
// Try primary database if there is no match
|
// Try primary database if there is no match
|
||||||
if ( !$title ) {
|
if ( !$title ) {
|
||||||
$title = Title::newFromID( $targetPageId, Title::GAID_FOR_UPDATE );
|
$title = Title::newFromID( $targetPageId, IDBAccessObject::READ_LATEST );
|
||||||
}
|
}
|
||||||
if ( $title ) {
|
if ( $title ) {
|
||||||
$result[] = $title;
|
$result[] = $title;
|
||||||
|
@ -564,7 +565,7 @@ class Event extends AbstractEntity implements Bundleable {
|
||||||
$this->title = $title;
|
$this->title = $title;
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
$this->title = Title::newFromID( $this->pageId, $fromPrimary ? Title::GAID_FOR_UPDATE : 0 );
|
$this->title = Title::newFromID( $this->pageId, $fromPrimary ? IDBAccessObject::READ_LATEST : 0 );
|
||||||
if ( $this->title ) {
|
if ( $this->title ) {
|
||||||
return $this->title;
|
return $this->title;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue