Merge soutade.fr:dynastie

This commit is contained in:
Grégory Soutadé 2012-10-20 20:18:43 +02:00
commit c142815915
1 changed files with 2 additions and 2 deletions

View File

@ -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><head><meta http-equiv="content-type" content="text/html; charset=utf-8" /></head><body>'
html_body += u'Bonjour %s,<br/><br/>Un nouveau commentaire a été posté pour l\'article "%s".<br/><br/>' % (author, post.title)
html_body = html_body + u'Pour le consulter, rendez vous sur <a href="http://%s%s#comment_%s">http://%s/%s#comment_%s</a><br/><br/>----------------<br/><pre>' % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
html_body = html_body + u'Pour le consulter, rendez vous sur <a href="http://%s%s#comment_%s">http://%s%s#comment_%s</a><br/><br/>----------------<br/><pre>' % (blog.name, post.getPath(), comment_index, blog.name, post.getPath(), comment_index)
c = comment.the_comment
# Avoid script injection
c = c.replace('<pre>', '&lt;pre&gt;')