Merge "Change .tocnumber to use grey text for section numbers in Table of Contents...
[lhc/web/wiklou.git] / includes / mail / EmailNotification.php
index 4f8f6b3..1d0bdf6 100644 (file)
@@ -23,6 +23,9 @@
  * @author Tim Starling
  * @author Luke Welling lwelling@wikimedia.org
  */
+use MediaWiki\Linker\LinkTarget;
+
+use MediaWiki\MediaWikiServices;
 
 /**
  * This module processes the email notifications when the current page is
@@ -91,7 +94,7 @@ class EmailNotification {
                if ( !$config->get( 'EnotifWatchlist' ) && !$config->get( 'ShowUpdatedMarker' ) ) {
                        return [];
                }
-               return WatchedItemStore::getDefaultInstance()->updateNotificationTimestamp(
+               return MediaWikiServices::getInstance()->getWatchedItemStore()->updateNotificationTimestamp(
                        $editor,
                        $linkTarget,
                        $timestamp
@@ -124,7 +127,7 @@ class EmailNotification {
                $config = RequestContext::getMain()->getConfig();
                $watchers = [];
                if ( $config->get( 'EnotifWatchlist' ) || $config->get( 'ShowUpdatedMarker' ) ) {
-                       $watchers = WatchedItemStore::getDefaultInstance()->updateNotificationTimestamp(
+                       $watchers = MediaWikiServices::getInstance()->getWatchedItemStore()->updateNotificationTimestamp(
                                $editor,
                                $title,
                                $timestamp
@@ -155,7 +158,7 @@ class EmailNotification {
                                $title,
                                [
                                        'editor' => $editor->getName(),
-                                       'editorID' => $editor->getID(),
+                                       'editorID' => $editor->getId(),
                                        'timestamp' => $timestamp,
                                        'summary' => $summary,
                                        'minorEdit' => $minorEdit,
@@ -232,7 +235,7 @@ class EmailNotification {
                                        if ( $watchingUser->getOption( 'enotifwatchlistpages' )
                                                && ( !$minorEdit || $watchingUser->getOption( 'enotifminoredits' ) )
                                                && $watchingUser->isEmailConfirmed()
-                                               && $watchingUser->getID() != $userTalkId
+                                               && $watchingUser->getId() != $userTalkId
                                                && !in_array( $watchingUser->getName(), $wgUsersNotifiedOnAllChanges )
                                                && !( $wgBlockDisablesLogin && $watchingUser->isBlocked() )
                                        ) {