summaryrefslogtreecommitdiff
path: root/includes/comment.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/comment.inc')
-rw-r--r--includes/comment.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/includes/comment.inc b/includes/comment.inc
index 0d1003530..6d6290f1e 100644
--- a/includes/comment.inc
+++ b/includes/comment.inc
@@ -145,6 +145,11 @@ function comment_post($pid, $id, $subject, $comment) {
}
}
+function comment_status($index = -1) {
+ $status = array("disabled", "enabled");
+ return $index < 0 ? $status : $status[$index];
+}
+
function comment_score($comment) {
$value = ($comment->votes) ? ($comment->score / $comment->votes) : (($comment->score) ? $comment->score : 0);
return ((strpos($value, ".")) ? substr($value ."00", 0, 4) : $value .".00");