serendipity_fetchComments produced wrong SQL code, if $where and $limit
was set but $order don't
This commit is contained in:
@ -281,7 +281,7 @@ function serendipity_fetchComments($id, $limit = null, $order = '', $showAll = f
|
|||||||
WHERE co.type LIKE '" . $type . "' AND co.entry_id > 0 $and
|
WHERE co.type LIKE '" . $type . "' AND co.entry_id > 0 $and
|
||||||
$group
|
$group
|
||||||
ORDER BY
|
ORDER BY
|
||||||
" . ($where != '' ? '' : 'co.id') . " " . ($order != '' ? $order : '') . "
|
" . (empty($order) ? 'co.id' : $order) . "
|
||||||
$limit";
|
$limit";
|
||||||
$comments = serendipity_db_query($query, false, 'assoc');
|
$comments = serendipity_db_query($query, false, 'assoc');
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user