Commit 837087ea authored by Kjartan's avatar Kjartan
Browse files

- the comment control panel is now only shown when there are comments.

parent 34650f8f
......@@ -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");
......
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment