diff options
author | Dries Buytaert <dries@buytaert.net> | 2000-12-30 11:58:14 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2000-12-30 11:58:14 +0000 |
commit | 44c48004346e5956cefbd5ebd558a4406cc61253 (patch) | |
tree | 174d686bc2fd83da9930f6bf20de9864ef34e71c /includes/submission.inc | |
parent | 83f6495c9aa810a884b7ca2c44d19f3f32b6092a (diff) | |
download | brdo-44c48004346e5956cefbd5ebd558a4406cc61253.tar.gz brdo-44c48004346e5956cefbd5ebd558a4406cc61253.tar.bz2 |
- here a bunch of changes to make "drupal" (for now) work with PHP 4.0.4
- tidied up some of the code and mainly working on the documentation
Diffstat (limited to 'includes/submission.inc')
-rw-r--r-- | includes/submission.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/includes/submission.inc b/includes/submission.inc index 1c7035069..b91d30de5 100644 --- a/includes/submission.inc +++ b/includes/submission.inc @@ -14,20 +14,20 @@ function submission_vote($id, $vote, $comment) { global $user, $submission_post_threshold, $submission_dump_threshold; if (!user_getHistory($user->history, "s$id")) { - ### Update submission's score- and votes-field: + // Update submission's score- and votes-field: db_query("UPDATE stories SET score = score $vote, votes = votes + 1 WHERE id = $id"); - ### Update the comments (if required): + // Update the comments (if required): 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: + // Update user's history record: user_setHistory($user, "s$id", $vote); // s = submission - ### Update story table (if required): + // Update story table (if required): $result = db_query("SELECT * FROM stories WHERE id = $id"); if ($submission = db_fetch_object($result)) { if ($submission->score >= $submission_post_threshold) { |