diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-11-14 09:03:44 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-11-14 09:03:44 +0000 |
commit | a461e3696cb0021a9586ceaf735b0bb8cf4c9ab0 (patch) | |
tree | d05b6509b70eaa5912b6f5ffb07376735ac7dff3 /includes | |
parent | c3e6f0014152d75d56f695f1f1cdfaee0caa2de1 (diff) | |
download | brdo-a461e3696cb0021a9586ceaf735b0bb8cf4c9ab0.tar.gz brdo-a461e3696cb0021a9586ceaf735b0bb8cf4c9ab0.tar.bz2 |
* tiny improvements (!= bug fixes)
Diffstat (limited to 'includes')
-rw-r--r-- | includes/submission.inc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/includes/submission.inc b/includes/submission.inc index 297bb0294..1c7035069 100644 --- a/includes/submission.inc +++ b/includes/submission.inc @@ -18,7 +18,11 @@ function submission_vote($id, $vote, $comment) { db_query("UPDATE stories SET score = score $vote, votes = votes + 1 WHERE id = $id"); ### Update the comments (if required): - if ($comment) db_query("INSERT INTO comments (sid, author, subject, comment, hostname, timestamp) VALUES($id, $user->id, '". addslashes(substr($comment, 0, 29)) ." ...', '". addslashes($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."')"); + if ($comment) { + watchdog("comment", "moderation: added comment with subject '$subject'"); + + db_query("INSERT INTO comments (sid, author, subject, comment, hostname, timestamp) VALUES($id, $user->id, '". check_input(substr($comment, 0, 29)) ." ...', '". check_input($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."')"); + } ### Update user's history record: user_setHistory($user, "s$id", $vote); // s = submission |