- Patch #58953 by tenrapid: critical bugfix: Flat Collapsed mode and Newest First order broken.

4.7.x
Dries Buytaert 2006-04-24 18:42:53 +00:00
parent 0e8a3c1344
commit 326f49b646
2 changed files with 8 additions and 8 deletions

View File

@ -710,12 +710,12 @@ function comment_render($node, $cid = 0) {
$nid = 0; $nid = 0;
} }
if (empty($mode)) { if (!isset($mode)) {
$mode = $user->mode ? $user->mode : ($_SESSION['comment_mode'] ? $_SESSION['comment_mode'] : variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED)); $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)) { if (!isset($order)) {
$order = $user->sort ? $user->sort : ($_SESSION['comment_sort'] ? $_SESSION['comment_sort'] : variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST)); $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)) { if (empty($comments_per_page)) {

View File

@ -710,12 +710,12 @@ function comment_render($node, $cid = 0) {
$nid = 0; $nid = 0;
} }
if (empty($mode)) { if (!isset($mode)) {
$mode = $user->mode ? $user->mode : ($_SESSION['comment_mode'] ? $_SESSION['comment_mode'] : variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED)); $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)) { if (!isset($order)) {
$order = $user->sort ? $user->sort : ($_SESSION['comment_sort'] ? $_SESSION['comment_sort'] : variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST)); $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)) { if (empty($comments_per_page)) {