From 7ff7cea572f102cae3bd2a19614f47f0968c580b Mon Sep 17 00:00:00 2001 From: garvinhicking Date: Sun, 15 Jul 2007 15:14:06 +0000 Subject: [PATCH] backport --- include/functions_comments.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/functions_comments.inc.php b/include/functions_comments.inc.php index 471536b..818c58e 100644 --- a/include/functions_comments.inc.php +++ b/include/functions_comments.inc.php @@ -174,7 +174,7 @@ function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = f WHERE co.type LIKE '" . $type . "' AND co.entry_id > 0 $and $group ORDER BY - " . ($where != '' ? '' : 'co.id') . " " . ($where == '' && $order != '' ? ',' : '') . ($order != '' ? $order : '') . " + " . ($where != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . " $limit"; $comments = serendipity_db_query($query, false, 'assoc'); @@ -328,6 +328,7 @@ function serendipity_printCommentsByAuthor() { $sql_where = " AND co.author = '" . serendipity_db_escape_string($serendipity['GET']['viewCommentAuthor']) . "'"; $group_by = "GROUP BY co.author"; } else { + $sql_where = " AND 1"; // Required fake 'where' condition $group_by = ""; } -- 2.39.5