aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xblogthon.cgi8
1 files changed, 4 insertions, 4 deletions
diff --git a/blogthon.cgi b/blogthon.cgi
index 8354aeb..8e1eca8 100755
--- a/blogthon.cgi
+++ b/blogthon.cgi
@@ -190,9 +190,9 @@ if cname and ctext and ctitle:
content = open(entries_dir + ctitle + '.comments', "w")
content.close()
except:
- errorpage(entries_dir, 'isn\'t writable!')
+ errorpage('"' + entries_dir + '" isn\'t writable!')
try:
- content = open(comments_file[0], "a+")
+ content = open(entries_dir + ctitle + '.comments', "a")
content.write("-." + cname + "\n")
content.write("+." + time.asctime() + "\n")
ctext = ctext.split("\n")
@@ -200,13 +200,13 @@ if cname and ctext and ctitle:
content.write("." + line + "\n")
content.close()
# Send mail?
- if new_comment_mail:
+ if not new_comment_mail == 'False':
msg = 'From: Blogthon\nTo: ' + mail_to + '\nSubject: New comment on ' + blog_title + '\n\nSomeone wrote a comment to this entry: ' + blog_url + '?p=' + ctitle.replace(' ', '-')
smtp = smtplib.SMTP(smtp_host)
smtp.sendmail(blog_title, mail_to, msg)
smtp.quit()
except:
- errorpage(comments_file, 'isn\'t writable!')
+ errorpage('Comment cannot be written!')
# Read entries and store their title and timestamp
entries = []