From 326f49b64678cccf5c57fe45820acd3595296a52 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 24 Apr 2006 18:42:53 +0000 Subject: [PATCH] - Patch #58953 by tenrapid: critical bugfix: Flat Collapsed mode and Newest First order broken. --- modules/comment.module | 8 ++++---- modules/comment/comment.module | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/comment.module b/modules/comment.module index 8a3db48b8db..afaf5492f96 100644 --- a/modules/comment.module +++ b/modules/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)) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 8a3db48b8db..afaf5492f96 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)) {