diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-10-16 20:13:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-10-16 20:13:22 +0000 |
commit | 33a3502dfee073325f5046baee655e6a2bdb29ec (patch) | |
tree | 7632ce5324998a3dac61b975cc2b3e24e1080063 /modules/tracker/tracker.module | |
parent | 2ec1512419549fa48fb9925b8cd31e239864769d (diff) | |
download | brdo-33a3502dfee073325f5046baee655e6a2bdb29ec.tar.gz brdo-33a3502dfee073325f5046baee655e6a2bdb29ec.tar.bz2 |
- Removed a node's link ID (lid) as discussed on the mailing list. See
'updates/3.00-to.x.xx.mysql' for the required MySQL updates.
- Renamed some "author" fields to "uid" fields for sake of consistency.
- Fixed the coding style of some PHP files.
- Fixed the moderation queue (fairly untested though).
- Re-introduced the temporary SQL table in _node_get().
- Added a missing 'auto_increment' to 'updates/3.00-to-x.xx.mysql'.
Diffstat (limited to 'modules/tracker/tracker.module')
-rw-r--r-- | modules/tracker/tracker.module | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/tracker/tracker.module b/modules/tracker/tracker.module index 462a649b4..d3f113e19 100644 --- a/modules/tracker/tracker.module +++ b/modules/tracker/tracker.module @@ -13,7 +13,7 @@ function tracker_comments($id = 0) { global $theme, $user; if ($id) { - $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.author = '". check_input($id) ."' GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10"); + $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.lid = n.nid WHERE c.uid = '". check_input($id) ."' GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10"); } else { $sresult = db_query("SELECT n.nid, n.title, COUNT(n.nid) AS comments, MAX(c.timestamp) AS last_comment FROM comments c LEFT JOIN node n ON c.lid = n.nid GROUP BY n.nid, n.title DESC ORDER BY last_comment DESC LIMIT 10"); @@ -23,7 +23,7 @@ function tracker_comments($id = 0) { $output .= format_plural($node->comments, "comment", "comments") ." ". t("attached to node") ." <a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a>:\n"; if ($id) { - $cresult = db_query("SELECT * FROM comments WHERE author = '". check_input($id) ."' AND lid = '$node->nid' ORDER BY cid DESC"); + $cresult = db_query("SELECT * FROM comments WHERE uid = '". check_input($id) ."' AND lid = '$node->nid' ORDER BY cid DESC"); } else { $cresult = db_query("SELECT * FROM comments WHERE lid = '$node->nid' ORDER BY cid DESC"); |