changeset 3486:79d7bce1095c

merged main
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 06 Apr 2008 23:35:07 +0200
parents aff01569df82 (current diff) be7c5a205cc2 (diff)
children 71b403707c1d
files
diffstat 2 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/events/emailnotify.py	Sun Apr 06 23:34:41 2008 +0200
+++ b/MoinMoin/events/emailnotify.py	Sun Apr 06 23:35:07 2008 +0200
@@ -35,6 +35,15 @@
     change = notification.page_change_message("page_changed", request, page, email_lang, comment=comment, revisions=revisions)
     _ = lambda s, wiki=False, r=request, l=email_lang: r.getText(s, wiki=wiki, lang=l)
 
+    if len(revisions) >= 2:
+        querystr = {'action': 'diff',
+                    'rev2': str(revisions[0]),
+                    'rev1': str(revisions[1])}
+    else:
+        querystr = {}
+
+    pagelink = "%(link)s\n\n" % {'link': notification.page_link(request, page, querystr)}
+
     subject = _('[%(sitename)s] %(trivial)sUpdate of "%(pagename)s" by %(username)s') % {
             'trivial': (trivial and _("Trivial ")) or "",
             'sitename': page.cfg.sitename or "Wiki",
@@ -42,7 +51,7 @@
             'username': page.uid_override or user.getUserIdentification(request),
         }
 
-    return {'subject': subject, 'body': change['text'] + change['diff']}
+    return {'subject': subject, 'body': change['text'] + pagelink + change['diff']}
 
 
 def send_notification(request, from_address, emails, data):
--- a/MoinMoin/events/notification.py	Sun Apr 06 23:34:41 2008 +0200
+++ b/MoinMoin/events/notification.py	Sun Apr 06 23:35:07 2008 +0200
@@ -76,7 +76,7 @@
     if msgtype == "page_changed":
         changes['text'] = _("Dear Wiki user,\n\n"
         'You have subscribed to a wiki page or wiki category on "%(sitename)s" for change notification.\n\n'
-        'The "%(pagename)s" page has been changed by %(editor)s:\n\n') % {
+        'The "%(pagename)s" page has been changed by %(editor)s:\n') % {
             'pagename': page.page_name,
             'editor': page.uid_override or user.getUserIdentification(request),
             'sitename': page.cfg.sitename or request.getBaseURL(),