summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-20 21:55:22 +0000
committerKjartan Mannes <kjartan@2.no-reply.drupal.org>2002-05-20 21:55:22 +0000
commit837087ea9944fd43ba415ba2493d53a97dfbfee3 (patch)
tree4b09f7351cfdedf7ccbbbd61b6e1855df3e9a425
parent34650f8f113df7c31eaa80e937586aa196902d4f (diff)
downloadbrdo-837087ea9944fd43ba415ba2493d53a97dfbfee3.tar.gz
brdo-837087ea9944fd43ba415ba2493d53a97dfbfee3.tar.bz2
- the comment control panel is now only shown when there are comments.
-rw-r--r--modules/comment.module4
-rw-r--r--modules/comment/comment.module4
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module
index 6c49faf53..bd3e036d8 100644
--- a/modules/comment.module
+++ b/modules/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");
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");