Merge "HISTORY: Add MediaWiki 1.18 post-release change notes"
[lhc/web/wiklou.git] / includes / mail / EmailNotification.php
index 8a089f6..4d1b855 100644 (file)
@@ -24,7 +24,6 @@
  * @author Luke Welling lwelling@wikimedia.org
  */
 
-use MediaWiki\Linker\LinkTarget;
 use MediaWiki\MediaWikiServices;
 
 /**
@@ -89,33 +88,6 @@ class EmailNotification {
                return $this->pageStatus;
        }
 
-       /**
-        * @deprecated since 1.27 use WatchedItemStore::updateNotificationTimestamp directly
-        *
-        * @param User $editor The editor that triggered the update.  Their notification
-        *  timestamp will not be updated(they have already seen it)
-        * @param LinkTarget $linkTarget The link target of the title to update timestamps for
-        * @param string $timestamp Set the update timestamp to this value
-        *
-        * @return int[] Array of user IDs
-        */
-       public static function updateWatchlistTimestamp(
-               User $editor,
-               LinkTarget $linkTarget,
-               $timestamp
-       ) {
-               wfDeprecated( __METHOD__, '1.27' );
-               $config = RequestContext::getMain()->getConfig();
-               if ( !$config->get( 'EnotifWatchlist' ) && !$config->get( 'ShowUpdatedMarker' ) ) {
-                       return [];
-               }
-               return MediaWikiServices::getInstance()->getWatchedItemStore()->updateNotificationTimestamp(
-                       $editor,
-                       $linkTarget,
-                       $timestamp
-               );
-       }
-
        /**
         * Send emails corresponding to the user $editor editing the page $title.
         *
@@ -154,7 +126,7 @@ class EmailNotification {
                // If nobody is watching the page, and there are no users notified on all changes
                // don't bother creating a job/trying to send emails, unless it's a
                // talk page with an applicable notification.
-               if ( !count( $watchers ) && !count( $wgUsersNotifiedOnAllChanges ) ) {
+               if ( $watchers === [] && !count( $wgUsersNotifiedOnAllChanges ) ) {
                        $sendEmail = false;
                        // Only send notification for non minor edits, unless $wgEnotifMinorEdits
                        if ( !$minorEdit || ( $wgEnotifMinorEdits && !$editor->isAllowed( 'nominornewtalk' ) ) ) {