summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2006-04-24 18:42:53 +0000
committerDries Buytaert <dries@buytaert.net>2006-04-24 18:42:53 +0000
commit326f49b64678cccf5c57fe45820acd3595296a52 (patch)
tree91b70085a4aba49aba9f5a3587f6c7ad76add05d /modules/comment/comment.module
parent0e8a3c13440d3dada4a8a6dac367c434cd073302 (diff)
downloadbrdo-326f49b64678cccf5c57fe45820acd3595296a52.tar.gz
brdo-326f49b64678cccf5c57fe45820acd3595296a52.tar.bz2
- Patch #58953 by tenrapid: critical bugfix: Flat Collapsed mode and Newest First order broken.
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 8a3db48b8..afaf5492f 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -710,12 +710,12 @@ function comment_render($node, $cid = 0) {
$nid = 0;
}
- if (empty($mode)) {
- $mode = $user->mode ? $user->mode : ($_SESSION['comment_mode'] ? $_SESSION['comment_mode'] : variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED));
+ if (!isset($mode)) {
+ $mode = isset($user->mode) ? $user->mode : (isset($_SESSION['comment_mode']) ? $_SESSION['comment_mode'] : variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED));
}
- if (empty($order)) {
- $order = $user->sort ? $user->sort : ($_SESSION['comment_sort'] ? $_SESSION['comment_sort'] : variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST));
+ if (!isset($order)) {
+ $order = isset($user->sort) ? $user->sort : (isset($_SESSION['comment_sort']) ? $_SESSION['comment_sort'] : variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST));
}
if (empty($comments_per_page)) {