From 5ac783ae669877f5fe2f2cb64290a03d5402caf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9gory=20Soutad=C3=A9?= Date: Sat, 20 Oct 2012 20:19:01 +0200 Subject: [PATCH] Don't send email to coment author --- views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/views.py b/views.py index 3046486..416caea 100644 --- a/views.py +++ b/views.py @@ -554,7 +554,7 @@ def add_comment(request, post_id, parent_id): comment_index = str(len(comments)) for comment in comments: email = comment.email - if email != '' and not email in emails: + if email != '' and email != request.POST['email'] and not email in emails: emails[email] = comment.author if len(emails) > 0: @@ -572,7 +572,7 @@ def add_comment(request, post_id, parent_id): html_body = u'' html_body += u'Bonjour %s,

Un nouveau commentaire a été posté pour l\'article "%s".

' % (author, post.title) - html_body = html_body + u'Pour le consulter, rendez vous sur http://%s/%s#comment_%s

----------------
'  % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
+            html_body = html_body + u'Pour le consulter, rendez vous sur http://%s%s#comment_%s

----------------
'  % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
             c = comment.the_comment
             # Avoid script injection
             c = c.replace('
', '<pre>')