diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-19 01:12:14 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2005-01-19 01:12:14 +0000 |
commit | 86af977ecaebbed31d2897bdf6f3b829b0be924c (patch) | |
tree | cddf9d214ca29f37003bd42753daca5e8940483e /modules/tracker.module | |
parent | e7edb55d63f78559972646af07107193c8c26a52 (diff) | |
download | brdo-86af977ecaebbed31d2897bdf6f3b829b0be924c.tar.gz brdo-86af977ecaebbed31d2897bdf6f3b829b0be924c.tar.bz2 |
- #15500: Fix tracker not showing nodes without comments.
- Tiny code style fix
Diffstat (limited to 'modules/tracker.module')
-rw-r--r-- | modules/tracker.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tracker.module b/modules/tracker.module index eff8878bf..db6a9057e 100644 --- a/modules/tracker.module +++ b/modules/tracker.module @@ -73,9 +73,9 @@ function tracker_page($uid = 0) { $output .= ''; if ($uid) { - $sql = 'SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND c.status = 0 WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_post DESC'; + $sql = 'SELECT n.nid, n.title, n.type, n.changed, n.uid, u.name, l.last_comment_timestamp AS last_post, l.comment_count FROM {node} n INNER JOIN {node_comment_statistics} l ON n.nid = l.nid INNER JOIN {users} u ON n.uid = u.uid LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = 0 OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d) ORDER BY last_post DESC'; $sql = node_rewrite_sql($sql); - $sql_count = 'SELECT n.nid FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND c.status = 0 WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)'; + $sql_count = 'SELECT n.nid FROM {node} n LEFT JOIN {comments} c ON n.nid = c.nid AND (c.status = 0 OR c.status IS NULL) WHERE n.status = 1 AND (n.uid = %d OR c.uid = %d)'; $sql_count = node_rewrite_sql($sql_count); $result = pager_query($sql, 25, 0, $sql_count, $uid, $uid); } |