diff options
-rw-r--r-- | modules/comment.module | 5 | ||||
-rw-r--r-- | modules/comment/comment.module | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/modules/comment.module b/modules/comment.module index daa14b9e5..6311f983e 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -516,7 +516,6 @@ function comment_render($node, $cid = 0) { if (empty($order)) { $order = $user->sort ? $user->sort : ($_SESSION["comment_sort"] ? $_SESSION["comment_sort"] : variable_get("comment_default_order", 1)); } - if (empty($threshold)) { $threshold = $user->threshold ? $user->threshold : ($_SESSION["comment_threshold"] ? $_SESSION["comment_threshold"] : variable_get("comment_default_threshold", 0)); } @@ -1303,9 +1302,13 @@ function theme_comment_threshold($threshold) { while ($filter = db_fetch_object($result)) { $filters .= " <option value=\"$filter->fid\"". ($threshold == $filter->fid ? " selected=\"selected\"" : "") .">". t($filter->filter) ."</option>"; } + if ($filters) { return "<select name=\"threshold\">$filters</select>\n"; } + else { + return "<input type=\"hidden\" name=\"threshold\" value=\"$threshold\" />\n"; + } } function theme_comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index daa14b9e5..6311f983e 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -516,7 +516,6 @@ function comment_render($node, $cid = 0) { if (empty($order)) { $order = $user->sort ? $user->sort : ($_SESSION["comment_sort"] ? $_SESSION["comment_sort"] : variable_get("comment_default_order", 1)); } - if (empty($threshold)) { $threshold = $user->threshold ? $user->threshold : ($_SESSION["comment_threshold"] ? $_SESSION["comment_threshold"] : variable_get("comment_default_threshold", 0)); } @@ -1303,9 +1302,13 @@ function theme_comment_threshold($threshold) { while ($filter = db_fetch_object($result)) { $filters .= " <option value=\"$filter->fid\"". ($threshold == $filter->fid ? " selected=\"selected\"" : "") .">". t($filter->filter) ."</option>"; } + if ($filters) { return "<select name=\"threshold\">$filters</select>\n"; } + else { + return "<input type=\"hidden\" name=\"threshold\" value=\"$threshold\" />\n"; + } } function theme_comment_controls($threshold = 1, $mode = 3, $order = 1, $comments_per_page = 50) { |