From: Ævar Arnfjörð Bjarmason Date: Thu, 5 Aug 2010 12:50:34 +0000 (+0000) Subject: UserMailer.php: Send diff links from old->new on $wgEnotifImpersonal, not from unrela... X-Git-Tag: 1.31.0-rc.0~35709 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;h=b63c3457a4123354fd2166ff977cbcc02b86ee8f;p=lhc%2Fweb%2Fwiklou.git UserMailer.php: Send diff links from old->new on $wgEnotifImpersonal, not from unrelated_old->old Since UserMailer's $wgEnotifImpersonal setting was introduced in r21897 it has ostensibly been sending out mails like these: The OpenStreetMap Wiki page Servers has been changed on 10:20, 5 August 2010 by TomH, see http://wiki.openstreetmap.org/wiki/Servers for the current revision. See http://wiki.openstreetmap.org/w/index.php?title=Servers&oldid=507861&diff=prev That link takes you to a page with the diff between: Revision as of 2010-07-26T15:22:38 -> Revision as of 2010-07-29T13:03:51 Instead it should take you to: Revision as of 2010-07-29T13:03:51 -> Revision as of 2010-08-05T10:20:50 So that you get a diff *to* the 10:20 revision mentioned in the original E-Mail. Switch diff=prev to diff=next to fix this. Now it'll emit a link like: http://wiki.openstreetmap.org/w/index.php?title=Servers&oldid=507861&diff=next Reported-by: Grant Slater --- diff --git a/includes/UserMailer.php b/includes/UserMailer.php index fec7c6e79a..8cb0355853 100644 --- a/includes/UserMailer.php +++ b/includes/UserMailer.php @@ -464,7 +464,7 @@ class EmailNotification { * revision. */ $keys['$NEWPAGE'] = wfMsgForContent('enotif_lastdiff', - $this->title->getFullURL("oldid={$this->oldid}&diff=prev")); + $this->title->getFullURL("oldid={$this->oldid}&diff=next")); $body = strtr( $body, $keys ); $pagetitle = $this->title->getPrefixedText();