From 7e7c457cf6822a4b9bba82a4f7d6532fb341b6b1 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 2 Oct 2001 15:34:03 +0000 Subject: - improved the tracker.module so that it shows all the recent comments instead of all recent comments to recent nodes. --- modules/tracker/tracker.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/tracker/tracker.module') diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 21ad284a1..f8c9ab81c 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -12,10 +12,10 @@ function tracker_comments($id = 0) { global $theme, $user; if ($id) { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS count FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.author = '". check_input($id) ."' GROUP BY n.nid DESC ORDER BY n.nid DESC LIMIT 5"); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS count FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.author = '". check_input($id) ."' GROUP BY n.nid DESC ORDER BY c.timestamp DESC LIMIT 10"); } else { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS count FROM comments c LEFT JOIN node n ON c.lid = n.nid GROUP BY n.nid DESC ORDER BY n.nid DESC LIMIT 5"); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS count FROM comments c LEFT JOIN node n ON c.lid = n.nid GROUP BY n.nid DESC ORDER BY c.timestamp DESC LIMIT 10"); } while ($node = db_fetch_object($sresult)) { -- cgit v1.2.3