UserMailer.php: Send diff links from old->new on $wgEnotifImpersonal, not from unrela...
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Thu, 5 Aug 2010 12:50:34 +0000 (12:50 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Thu, 5 Aug 2010 12:50:34 +0000 (12:50 +0000)
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 <openstreetmap@firefishy.com>
includes/UserMailer.php

index fec7c6e..8cb0355 100644 (file)
@@ -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();