# HG changeset patch # User Steve Kemp # Date 1199396758 0 # Node ID 4d2f0d6866e528f577a6817bd300311db6164491 # Parent 9f91d9377d1aef92ca830b3155e07e0efc1c693d Updated the display of the blog comment when using AJAX diff -r 9f91d9377d1a -r 4d2f0d6866e5 cgi-bin/comments.cgi --- a/cgi-bin/comments.cgi Thu Jan 03 21:44:20 2008 +0000 +++ b/cgi-bin/comments.cgi Thu Jan 03 21:45:58 2008 +0000 @@ -134,6 +134,8 @@ # Open the file. # my $file = $COMMENT . "/" . $id . "." . $timestr; +$file =~ s/[ \t]//g; + open( FILE, ">", $file ); print FILE "Name: $name\n"; print FILE "Mail: $mail\n"; @@ -149,13 +151,13 @@ # if ( length($TO) && length($FROM) ) { - open ( SENDMAIL, "|/usr/lib/sendmail -t -f $FROM"); - print SENDMAIL "To: $TO\n"; - print SENDMAIL "From: $FROM\n"; - print SENDMAIL "Subject: New Comment [$id]\n"; - print SENDMAIL "\n\n"; - print ( SENDMAIL `cat $file` ); - close ( SENDMAIL ); + open ( SENDMAIL, "|/usr/lib/sendmail -t -f $FROM"); + print SENDMAIL "To: $TO\n"; + print SENDMAIL "From: $FROM\n"; + print SENDMAIL "Subject: New Comment [$id]\n"; + print SENDMAIL "\n\n"; + print SENDMAIL `cat $file`; + close( SENDMAIL ); } # @@ -164,8 +166,10 @@ if ( $cgi->param( "ajax" ) ) { print <Comment Submitted +

Thanks for your comment, it will be made live when the queue is moderated next.

+
EOF exit; diff -r 9f91d9377d1a -r 4d2f0d6866e5 themes/blog.steve.org.uk/comment-form.inc --- a/themes/blog.steve.org.uk/comment-form.inc Thu Jan 03 21:44:20 2008 +0000 +++ b/themes/blog.steve.org.uk/comment-form.inc Thu Jan 03 21:45:58 2008 +0000 @@ -1,7 +1,7 @@ +

Add A Comment

-
@@ -17,6 +17,6 @@

Your submission will be ignored if any field is left blank. But your email address will not be displayed.

+
-