Mercurial > moin > 1.9
changeset 3592:ff60ed56002a
s/body/text/g to get rid of a stupid bug
author | Karol 'grzywacz' Nowak <grywacz@gmail.com> |
---|---|
date | Mon, 12 May 2008 22:49:20 +0200 |
parents | 15e5ca7240ab |
children | c71228372904 1dcf6a261c2a |
files | MoinMoin/events/emailnotify.py MoinMoin/events/jabbernotify.py MoinMoin/events/notification.py |
diffstat | 3 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/events/emailnotify.py Mon May 12 22:06:27 2008 +0200 +++ b/MoinMoin/events/emailnotify.py Mon May 12 22:49:20 2008 +0200 @@ -51,7 +51,7 @@ 'username': page.uid_override or user.getUserIdentification(request), } - return {'subject': subject, 'body': change['text'] + pagelink + change['diff']} + return {'subject': subject, 'text': change['text'] + pagelink + change['diff']} def send_notification(request, from_address, emails, data): @@ -62,7 +62,7 @@ @rtype int """ - return sendmail.sendmail(request, emails, data['subject'], data['body'], mail_from=from_address) + return sendmail.sendmail(request, emails, data['subject'], data['text'], mail_from=from_address) def handle_page_change(event): @@ -152,7 +152,7 @@ "Page link: %(page)s\n") % {'attach': attachlink, 'page': pagelink} data = notification.attachment_added(request, _, event.pagename, event.filename, event.size) - data['body'] = data['body'] + links + data['text'] = data['text'] + links emails = [usr.email for usr in subscribers[lang]]
--- a/MoinMoin/events/jabbernotify.py Mon May 12 22:06:27 2008 +0200 +++ b/MoinMoin/events/jabbernotify.py Mon May 12 22:49:20 2008 +0200 @@ -150,7 +150,7 @@ if usr.isSuperUser() and usr.jid and event_name in usr.jabber_subscribed_events: jids.append(usr.jid) - data = {'action': "user_created", 'subject': msg['subject'], 'text': msg['body'], + data = {'action': "user_created", 'subject': msg['subject'], 'text': msg['text'], 'url_list': []} send_notification(event.request, jids, data)
--- a/MoinMoin/events/notification.py Mon May 12 22:06:27 2008 +0200 +++ b/MoinMoin/events/notification.py Mon May 12 22:49:20 2008 +0200 @@ -130,7 +130,7 @@ """ _ = request.getText subject = _("New user account created on %(sitename)s") % {'sitename': sitename or "Wiki"} - body = _("""Dear Superuser, a new user has just been created. Details follow: + text = _("""Dear Superuser, a new user has just been created. Details follow: User name: %(username)s Email address: %(useremail)s""") % { @@ -138,7 +138,7 @@ 'useremail': email, } - return {'subject': subject, 'body': body} + return {'subject': subject, 'text': text} def attachment_added(request, _, page_name, attach_name, attach_size): """Formats a message used to notify about new attachments