diff options
author | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-16 09:32:01 +0000 |
---|---|---|
committer | Kjartan Mannes <kjartan@2.no-reply.drupal.org> | 2002-05-16 09:32:01 +0000 |
commit | c1f617a3abce9b53f260bf2edd36498df5c1d536 (patch) | |
tree | 2d282ad339b99cdb2c43968719b154e1d5e42ba6 | |
parent | 098d9002d82a5b32af2967726293ac14feb43c49 (diff) | |
download | brdo-c1f617a3abce9b53f260bf2edd36498df5c1d536.tar.gz brdo-c1f617a3abce9b53f260bf2edd36498df5c1d536.tar.bz2 |
- fixing bug #181.
-rw-r--r-- | modules/comment.module | 8 | ||||
-rw-r--r-- | modules/comment/comment.module | 8 | ||||
-rw-r--r-- | modules/queue.module | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/modules/comment.module b/modules/comment.module index 5cd94e596..6c49faf53 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -465,7 +465,7 @@ function comment_thread_max($comments, $threshold, $pid = 0, $level = 0) { } -function comment_render($nid, $cid) { +function comment_render($nid, $cid = 0) { global $user, $theme, $mode, $order, $threshold; if (user_access("access comments")) { @@ -501,7 +501,7 @@ function comment_render($nid, $cid) { $theme->box(t("Control panel"), $theme->comment_controls($threshold, $mode, $order)); - if (isset($cid)) { + 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"); if ($comment = db_fetch_object($result)) { comment_view($comment, comment_links($comment)); @@ -538,7 +538,7 @@ function comment_render($nid, $cid) { } if ($comments) { - if (isset($cid)) { + if ($cid) { comment_thread_min($comments, $threshold, $cid, 1); } else { @@ -556,7 +556,7 @@ function comment_render($nid, $cid) { comment_thread_max($comments, $threshold, $cid, 1); } else { - comment_thread_max($comments, $threshold, (isset($cid) ? $cid : 0), isset($cid)); + comment_thread_max($comments, $threshold, 0, 0); } } } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 5cd94e596..6c49faf53 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -465,7 +465,7 @@ function comment_thread_max($comments, $threshold, $pid = 0, $level = 0) { } -function comment_render($nid, $cid) { +function comment_render($nid, $cid = 0) { global $user, $theme, $mode, $order, $threshold; if (user_access("access comments")) { @@ -501,7 +501,7 @@ function comment_render($nid, $cid) { $theme->box(t("Control panel"), $theme->comment_controls($threshold, $mode, $order)); - if (isset($cid)) { + 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"); if ($comment = db_fetch_object($result)) { comment_view($comment, comment_links($comment)); @@ -538,7 +538,7 @@ function comment_render($nid, $cid) { } if ($comments) { - if (isset($cid)) { + if ($cid) { comment_thread_min($comments, $threshold, $cid, 1); } else { @@ -556,7 +556,7 @@ function comment_render($nid, $cid) { comment_thread_max($comments, $threshold, $cid, 1); } else { - comment_thread_max($comments, $threshold, (isset($cid) ? $cid : 0), isset($cid)); + comment_thread_max($comments, $threshold, 0, 0); } } } diff --git a/modules/queue.module b/modules/queue.module index 1bbc7c889..833a7c442 100644 --- a/modules/queue.module +++ b/modules/queue.module @@ -151,7 +151,7 @@ function queue_view($nid) { $theme->box(t("Moderate"), $output); } if ($node->comment && variable_get("queue_show_comments", 1)) { - comment_render($node->nid, 0); + comment_render($node->nid); } $theme->footer(); } |