From: garvinhicking Date: Sun, 2 Jul 2006 18:57:26 +0000 (+0000) Subject: support two new options X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=ca4cbc452b2cf091fc45c17ebba82d3603b025c0;p=s9y.git support two new options --- diff --git a/docs/NEWS b/docs/NEWS index 05a37d7..2bc27c0 100644 --- a/docs/NEWS +++ b/docs/NEWS @@ -3,6 +3,9 @@ Version 1.1-alpha7() ------------------------------------------------------------------------ + * Made smarty function "serendipity_printComments" accept to new + parameters: "order" (ASC/DESC) and "limit" (garvinhicking) + * Comment moderation panel, usability improvement: Blocking authors/ URLs will lead to the originating page. Thanks to Tanel Raja! (garvinhicking) diff --git a/include/functions_smarty.inc.php b/include/functions_smarty.inc.php index be1e332..7799254 100644 --- a/include/functions_smarty.inc.php +++ b/include/functions_smarty.inc.php @@ -557,7 +557,11 @@ function &serendipity_smarty_printComments($params, &$smarty) { $params['mode'] = VIEWMODE_THREADED; } - $comments = serendipity_fetchComments($params['entry']); + if (isset($params['order']) && $params['order'] != 'DESC') { + $params['order'] = 'ASC'; + } + + $comments = serendipity_fetchComments($params['entry'], (int)$params['limit'], $params['order']); if (!empty($serendipity['POST']['preview'])) { $comments[] =