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/comment | |
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/comment')
-rw-r--r-- | modules/comment/comment.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index d87b89724..c1a3e617c 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -2,7 +2,7 @@ function comment_search($keys) { global $PHP_SELF; - $result = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.author = u.uid WHERE c.subject LIKE '%$keys%' OR c.comment LIKE '%$keys%' ORDER BY c.timestamp DESC LIMIT 20"); + $result = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.subject LIKE '%$keys%' OR c.comment LIKE '%$keys%' ORDER BY c.timestamp DESC LIMIT 20"); while ($comment = db_fetch_object($result)) { $find[$i++] = array("title" => check_output($comment->subject), "link" => (strstr($PHP_SELF, "admin.php") ? "admin.php?mod=comment&op=edit&id=$comment->cid" : "node.php?id=$comment->lid&cid=$comment->cid"), "user" => $comment->name, "date" => $comment->timestamp); } @@ -23,7 +23,7 @@ function comment_link($type) { function comment_edit($id) { - $result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON c.author = u.uid WHERE c.cid = '$id'"); + $result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON c.uid = u.uid WHERE c.cid = '$id'"); $comment = db_fetch_object($result); $form .= form_item(t("Author"), format_name($comment)); @@ -40,7 +40,7 @@ function comment_save($id, $edit) { } function comment_overview() { - $result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON u.uid = c.author ORDER BY timestamp DESC LIMIT 50"); + $result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN users u ON u.uid = c.uid ORDER BY timestamp DESC LIMIT 50"); $output .= "<TABLE BORDER=\"1\" CELLPADDING=\"2\" CELLSPACING=\"2\">\n"; $output .= " <TR><TH>subject</TH><TH>author</TH><TH>date</TH><TH COLSPAN=\"2\">operations</TH></TR>\n"; |