]> git.mjollnir.org Git - s9y.git/commitdiff
support two new options
authorgarvinhicking <garvinhicking>
Sun, 2 Jul 2006 18:57:26 +0000 (18:57 +0000)
committergarvinhicking <garvinhicking>
Sun, 2 Jul 2006 18:57:26 +0000 (18:57 +0000)
docs/NEWS
include/functions_smarty.inc.php

index 05a37d72ce2e3415c6c7d239e050b94689de830f..2bc27c0fea6c23c80510b6aaadcedc6c93aa614a 100644 (file)
--- 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)
index be1e332097b8878f67740520266e86ddf120de48..7799254f7728c01c85eed2277722e14db114dab4 100644 (file)
@@ -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[] =