From 2952d16f78eea91724760f526504010cb8f796a9 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 20 Jan 2001 12:20:31 +0000 Subject: - updated/improved discussion engine: it needs additional fine-tuning though but I think this is stable enough for public consumption and real-life testing. ==> a first big step towards a flexible comment engine. IMPORTANT: - Required theme updatins: UnConeD: check your $theme->controls() as I added a very, very dummy implementation - Required database updates: alter table users modify mode tinyint(1) DEFAULT '' NOT NULL; alter table comments change sid lid int(6) DEFAULT '0' NOT NULL; alter table comments add link varchar(16) DEFAULT '' NOT NULL; update comments set link = 'story'; --- includes/submission.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'includes/submission.inc') diff --git a/includes/submission.inc b/includes/submission.inc index 67c814079..628aeae75 100644 --- a/includes/submission.inc +++ b/includes/submission.inc @@ -11,7 +11,7 @@ function submission_score($id) { } function submission_vote($id, $vote, $comment) { - global $user, $submission_post_threshold, $submission_dump_threshold; + global $submission_post_threshold, $submission_dump_threshold, $user; if (!user_getHistory($user->history, "s$id")) { // Update submission's score- and votes-field: @@ -21,7 +21,7 @@ function submission_vote($id, $vote, $comment) { if ($comment) { watchdog("comment", "moderation: added comment with subject '$subject'"); - db_query("INSERT INTO comments (sid, author, subject, comment, hostname, timestamp, score) VALUES($id, $user->id, '". check_input(substr($comment, 0, 29)) ." ...', '". check_input($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."', '" . ($user->userid ? 1 : 0) . "')"); + db_query("INSERT INTO comments (lid, link, author, subject, comment, hostname, timestamp, score) VALUES($id, 'story', $user->id, '". check_input(substr($comment, 0, 29)) ." ...', '". check_input($comment) ."', '". getenv("REMOTE_ADDR") ."', '". time() ."', '1')"); } // Update user's history record: -- cgit v1.2.3