From 837087ea9944fd43ba415ba2493d53a97dfbfee3 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Mon, 20 May 2002 21:55:22 +0000 Subject: - the comment control panel is now only shown when there are comments. --- modules/comment/comment.module | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/comment') diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 6c49faf53..bd3e036d8 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -499,7 +499,9 @@ function comment_render($nid, $cid = 0) { ** Render control panel: */ - $theme->box(t("Control panel"), $theme->comment_controls($threshold, $mode, $order)); + if (comment_num_all($nid)) { + $theme->box(t("Control panel"), $theme->comment_controls($threshold, $mode, $order)); + } if ($cid) { $result = db_query("SELECT c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = '$cid' GROUP BY c.cid, c.pid, c.nid, c.subject, c.comment, c.timestamp, u.uid, u.name"); -- cgit v1.2.3