From de5b9a168daeef12b6f7bcf6e43b767a2d7f35d8 Mon Sep 17 00:00:00 2001 From: Kjartan Mannes Date: Mon, 22 Apr 2002 09:05:36 +0000 Subject: - bug fixes: * fixed mails not being parsed properly. * tracker now shows user name when you view your own recent comments. * link to submission queue now points to the right place. * fixed jabber module. * theme is now activated when changed. - applied Gerhards coding style patch. --- modules/tracker.module | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'modules/tracker.module') diff --git a/modules/tracker.module b/modules/tracker.module index 6af261647..2ddc4440c 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -28,18 +28,18 @@ function tracker_comments($id = 0) { } while ($node = db_fetch_object($sresult)) { - $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ".l(check_output($node->title), array("id" => $node->nid)).":\n"; + $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." ". l(check_output($node->title), array("id" => $node->nid)) .":\n"; if ($id) { - $cresult = db_query("SELECT * FROM comments WHERE timestamp > $period AND uid = '%s' AND nid = '$node->nid' ORDER BY cid DESC", $id); + $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > $period AND c.uid = '%d' AND c.nid = '%d' ORDER BY cid DESC", $id, $node->nid); } else { - $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > $period AND c.nid = '$node->nid' ORDER BY c.cid DESC"); + $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > $period AND c.nid = '%d' ORDER BY cid DESC", $node->nid); } $output .= "\n"; } -- cgit v1.2.3