changeset 1521:ac7e2218a298

Mail notifications contain a link to the diff action so the user can see the coloured difference more easily. Thanks to Tobias Polzin.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 03 Sep 2006 02:34:18 +0200
parents 563bfe02b04f
children 2564531181d8 ff050fb8f2c2
files MoinMoin/PageEditor.py docs/CHANGES
diffstat 2 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/PageEditor.py	Sun Sep 03 01:06:20 2006 +0200
+++ b/MoinMoin/PageEditor.py	Sun Sep 03 02:34:18 2006 +0200
@@ -584,12 +584,17 @@
         """
         _ = lambda s, formatted=True, r=self.request, l=email_lang: r.getText(s, formatted=formatted, lang=l)
 
+        pagelink = self.request.getQualifiedURL(self.url(self.request))
+        if len(revisions) >= 2:
+            pagelink += "?action=diff&rev2=%i&rev1=%i" % tuple(revisions[-2:])
+
+
         mailBody = _("Dear Wiki user,\n\n"
             'You have subscribed to a wiki page or wiki category on "%(sitename)s" for change notification.\n\n'
             "The following page has been changed by %(editor)s:\n"
             "%(pagelink)s\n\n", formatted=False) % {
                 'editor': self.uid_override or user.getUserIdentification(self.request),
-                'pagelink': self.request.getQualifiedURL(self.url(self.request)),
+                'pagelink': pagelink,
                 'sitename': self.cfg.sitename or self.request.getBaseURL(),
         }
 
--- a/docs/CHANGES	Sun Sep 03 01:06:20 2006 +0200
+++ b/docs/CHANGES	Sun Sep 03 02:34:18 2006 +0200
@@ -136,7 +136,7 @@
       TWISTED ?
     * setResponseCode request method DEPRECATED (it only worked for Twisted
       anyway), just use emit_http_headers and include a Status: XXX header.
-      Method will vanish with moin 1.7. 
+      Method will vanish with moin 1.7.
     * cfg.url_prefix is DEPRECATED, please use cfg.url_prefix_static.
     * d['title_link'] is not supported any more. You can easily make that link
       on your own in your theme, see example in MoinMoin/theme/__init__.py,
@@ -264,6 +264,8 @@
       internally, too. So if GUI editor invocation is broken due to browser
       compatibility issues or a wrong browser version check, please file a bug
       at FCKeditor development or browser development.
+    * Mail notifications contain a link to the diff action so the user
+      can see the coloured difference more easily. Thanks to Tobias Polzin.
 
 Version 1.5-current:
    * moin.fcg improved - if you use FastCGI, you must use the new file: