summaryrefslogtreecommitdiff
path: root/includes/submission.inc
diff options
context:
space:
mode:
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: