summaryrefslogtreecommitdiff
path: root/discussion.php
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2000-11-25 12:56:04 +0000
committerDries Buytaert <dries@buytaert.net>2000-11-25 12:56:04 +0000
commit086e72d4b101311fde20d26c5e04eb9bace91986 (patch)
treeb41c616e52afaac11a4467d8ad61ef3097dbcd75 /discussion.php
parent01018b68304e917836df9bdc051ef34e7da88ef0 (diff)
downloadbrdo-086e72d4b101311fde20d26c5e04eb9bace91986.tar.gz
brdo-086e72d4b101311fde20d26c5e04eb9bace91986.tar.bz2
- Redid most of account.php and fixed quite some bugs!
Check out your new user account stuff and give me some feedback.
Diffstat (limited to 'discussion.php')
-rw-r--r--discussion.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/discussion.php b/discussion.php
index 21b989666..3ebd689cf 100644
--- a/discussion.php
+++ b/discussion.php
@@ -1,10 +1,5 @@
<?
-function discussion_score($comment) {
- $value = ($comment->votes) ? ($comment->score / $comment->votes) : (($comment->score) ? $comment->score : 0);
- return (strpos($value, ".")) ? substr($value ."00", 0, 4) : $value .".00";
-}
-
function discussion_moderate($moderate) {
global $user, $comment_votes;
@@ -249,10 +244,10 @@ function comment_post($pid, $sid, $subject, $comment) {
global $user, $theme;
### Check for fake threads:
- $fake = db_result(db_query("SELECT COUNT(*) FROM stories WHERE id = $sid"), 0);
+ $fake = db_result(db_query("SELECT COUNT(id) FROM stories WHERE id = $sid"), 0);
### Check for duplicate comments:
- $duplicate = db_result(db_query("SELECT COUNT(*) FROM comments WHERE pid = '$pid' AND sid = '$sid' AND subject = '". check_input($subject) ."' AND comment = '". check_input($comment) ."'"), 0);
+ $duplicate = db_result(db_query("SELECT COUNT(cid) FROM comments WHERE pid = '$pid' AND sid = '$sid' AND subject = '". check_input($subject) ."' AND comment = '". check_input($comment) ."'"), 0);
if ($fake != 1) {
watchdog("error", "discussion: attempt to insert fake comment");