(bug 32210) UserMailer.php: New edit emails should offer a single-diff link.
authormrbluesky <mrbluesky@localhost>
Fri, 10 Feb 2012 21:47:37 +0000 (21:47 +0000)
committermrbluesky <mrbluesky@localhost>
Fri, 10 Feb 2012 21:47:37 +0000 (21:47 +0000)
RELEASE-NOTES-1.20
includes/UserMailer.php

index 4d85e88..ab2ef0a 100644 (file)
@@ -22,6 +22,8 @@ production.
   when we try to set the user's cookies for login.
 * (bug 34254) Using a gzipped file cache ($wgUseGzip and $wgUseFileCache)
   compressed the output twice resulting in garbage output (since 1.18)
+* (bug 32210) New edit emails for watched pages always provide a link to the
+  edit which triggered the mail.
 
 === API changes in 1.20 ===
 * (bug 34316) Add ability to retrieve maximum upload size from MediaWiki API.
index 9909ba4..14fd965 100644 (file)
@@ -575,12 +575,13 @@ class EmailNotification {
                $keys = array();
 
                if ( $this->oldid ) {
-                       if ( $wgEnotifImpersonal ) {
-                               // For impersonal mail, show a diff link to the last revision.
-                               $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastdiff',
-                                       $this->title->getCanonicalUrl( 'diff=next&oldid=' . $this->oldid ) );
-                       } else {
-                               $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastvisited',
+                       // Always show a link to the diff which triggered the mail. See bug 32210.
+                       $keys['$NEWPAGE'] = wfMsgForContent( 'enotif_lastdiff',
+                               $this->title->getCanonicalUrl( 'diff=next&oldid=' . $this->oldid ) );
+                       if ( !$wgEnotifImpersonal ) {
+                               // For personal mail, also show a link to the diff of all changes
+                               // since last visited.
+                               $keys['$NEWPAGE'] .= " \n" . wfMsgForContent( 'enotif_lastvisited',
                                        $this->title->getCanonicalUrl( 'diff=0&oldid=' . $this->oldid ) );
                        }
                        $keys['$OLDID']   = $this->oldid;