summaryrefslogtreecommitdiff
path: root/includes/submission.inc
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-01-20 12:20:31 +0000
committerDries Buytaert <dries@buytaert.net>2001-01-20 12:20:31 +0000
commit2952d16f78eea91724760f526504010cb8f796a9 (patch)
tree21598276fd9bc316be320308c5cd8eeafa77c12d /includes/submission.inc
parent53b92a614a9e30b693760b8299342f9bfb01320b (diff)
downloadbrdo-2952d16f78eea91724760f526504010cb8f796a9.tar.gz
brdo-2952d16f78eea91724760f526504010cb8f796a9.tar.bz2
- 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';
Diffstat (limited to 'includes/submission.inc')
-rw-r--r--includes/submission.inc4
1 files changed, 2 insertions, 2 deletions
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: