diff options
Diffstat (limited to 'includes/function.inc')
-rw-r--r-- | includes/function.inc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/includes/function.inc b/includes/function.inc index 71276e780..e564b3149 100644 --- a/includes/function.inc +++ b/includes/function.inc @@ -12,11 +12,6 @@ function load_theme() { return new Theme(); } -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 check_textfield($message) { global $allowed_html; return strip_tags(str_replace("\"", """, stripslashes($message)), $allowed_html); @@ -42,21 +37,6 @@ function check_output($message, $nl2br = 0) { else return strip_tags(stripslashes($message), $allowed_html); } -function discussion_num_replies($id, $count = 0) { - $result = db_query("SELECT COUNT(cid) FROM comments WHERE pid = $id"); - return ($result) ? db_result($result, 0) : 0; -} - -function discussion_num_filtered($sid, $pid) { - global $user; - - $threshold = ($user->id) ? $user->threshold : "0"; - $pid = ($pid) ? $pid : 0; - - $result = db_query("SELECT COUNT(cid) FROM comments WHERE sid = $sid AND pid = $pid AND (votes != 0 AND score / votes < $threshold)"); - return ($result) ? db_result($result, 0) : 0; -} - function format_plural($count, $singular, $plural) { return ($count == 1) ? "$count $singular" : "$count $plural"; } |