From c9f492e698a643fe6a7a494252291c3184238ad0 Mon Sep 17 00:00:00 2001 From: mrbluesky Date: Fri, 10 Feb 2012 21:47:37 +0000 Subject: [PATCH] (bug 32210) UserMailer.php: New edit emails should offer a single-diff link. --- RELEASE-NOTES-1.20 | 2 ++ includes/UserMailer.php | 13 +++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20 index 4d85e88fd8..ab2ef0a8cc 100644 --- a/RELEASE-NOTES-1.20 +++ b/RELEASE-NOTES-1.20 @@ -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. diff --git a/includes/UserMailer.php b/includes/UserMailer.php index 9909ba4f18..14fd965025 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -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; -- 2.20.1