summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-10-02 15:34:03 +0000
committerDries Buytaert <dries@buytaert.net>2001-10-02 15:34:03 +0000
commit7e7c457cf6822a4b9bba82a4f7d6532fb341b6b1 (patch)
treefc21a1ad5e37223f6cb708e02cc8483accf29a5c
parent63ae792556d50e5a2194901688e2327e8132e27d (diff)
downloadbrdo-7e7c457cf6822a4b9bba82a4f7d6532fb341b6b1.tar.gz
brdo-7e7c457cf6822a4b9bba82a4f7d6532fb341b6b1.tar.bz2
- improved the tracker.module so that it shows all the recent comments
instead of all recent comments to recent nodes.
-rw-r--r--modules/tracker.module4
-rw-r--r--modules/tracker/tracker.module4
2 files changed, 4 insertions, 4 deletions
diff --git a/modules/tracker.module b/modules/tracker.module
index 21ad284a1..f8c9ab81c 100644
--- a/modules/tracker.module
+++ b/modules/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)) {
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)) {