Remove redundant check

$wgEchoNotifications is checked inside EchoEvent::create(). Similar
code (e.g. onRollbackComplete() in this file) does not check it.

Change-Id: I2be05ae182c3fd5d90b87e9579f8c2aa6b79c655
This commit is contained in:
Bartosz Dziewoński 2021-03-17 12:50:45 +01:00
parent 906146ac79
commit 43747e5b0b

View file

@ -527,8 +527,6 @@ class EchoHooks implements RecentChange_saveHook {
RevisionRecord $revisionRecord,
EditResult $editResult
) {
global $wgEchoNotifications;
if ( $editResult->isNullEdit() ) {
return;
}
@ -587,7 +585,7 @@ class EchoHooks implements RecentChange_saveHook {
// Handle the case of someone undoing an edit, either through the
// 'undo' link in the article history or via the API.
if ( isset( $wgEchoNotifications['reverted'] ) && $undidRevId ) {
if ( $undidRevId ) {
$store = MediaWikiServices::getInstance()->getRevisionStore();
$undidRevision = $store->getRevisionById( $undidRevId );
if (