diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-20 21:55:22 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-20 21:55:22 +0000 |
commit | 837087ea9944fd43ba415ba2493d53a97dfbfee3 (patch) | |
tree | 4b09f7351cfdedf7ccbbbd61b6e1855df3e9a425 /modules | |
parent | 34650f8f113df7c31eaa80e937586aa196902d4f (diff) | |
download | brdo-837087ea9944fd43ba415ba2493d53a97dfbfee3.tar.gz brdo-837087ea9944fd43ba415ba2493d53a97dfbfee3.tar.bz2 |
- the comment control panel is now only shown when there are comments.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/comment.module | 4 | ||||
-rw-r--r-- | modules/comment/comment.module | 4 |
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"); |