summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDries Buytaert2003-02-09 14:37:58 (GMT)
committer Dries Buytaert2003-02-09 14:37:58 (GMT)
commitc5a69d94825009be821e27de94985ecdc07d3499 (patch)
tree6161f6bd9c37c46bee6bc68962a68d9a2ed5868d
parentce563826b003f12e1240f989678f051cc3868744 (diff)
- Fixed bug #1133: disabled comments are no longer shown. Thanks Gerhard.
-rw-r--r--modules/tracker.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tracker.module b/modules/tracker.module
index e663ea7..6457604 100644
--- a/modules/tracker.module
+++ b/modules/tracker.module
@@ -40,10 +40,10 @@ function tracker_comments($id = 0) {
$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 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);
+ $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > %d AND c.uid = '%d' AND c.nid = '%d' AND c.status = 0 ORDER BY cid DESC", $period, $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 = '%d' ORDER BY cid DESC", $node->nid);
+ $cresult = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.timestamp > %d AND c.nid = '%d'AND c.status = 0 ORDER BY cid DESC", $period, $node->nid);
}
$output .= "<ul>";