Revert r38686, per comments on CodeReview (in brief, the backslashes and such are...
[lhc/web/wiklou.git] / includes / UserMailer.php
index cd889df..05ad2b6 100644 (file)
@@ -259,14 +259,9 @@ class UserMailer {
  *
  */
 class EmailNotification {
-       /**@{{
-        * @private
-        */
-       var $to, $subject, $body, $replyto, $from;
-       var $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
-       var $mailTargets = array();
-
-       /**@}}*/
+       private $to, $subject, $body, $replyto, $from;
+       private $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
+       private $mailTargets = array();
 
        /**
         * Send emails corresponding to the user $editor editing the page $title.
@@ -404,7 +399,9 @@ class EmailNotification {
 
                $this->sendMails();
 
-               if ( $wgShowUpdatedMarker || $wgEnotifWatchlist ) {
+               $latestTimestamp = Revision::getTimestampFromId( $title->getLatestRevID() );
+               // Do not update watchlists if something else already did.
+               if ( $timestamp >= $latestTimestamp && ($wgShowUpdatedMarker || $wgEnotifWatchlist) ) {
                        # Mark the changed watch-listed page with a timestamp, so that the page is
                        # listed with an "updated since your last visit" icon in the watch list. Do
                        # not do this to users for their own edits.