From 33a3502dfee073325f5046baee655e6a2bdb29ec Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 16 Oct 2001 20:13:22 +0000 Subject: - 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'. --- modules/comment/comment.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/comment') 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 .= "\n"; $output .= " \n"; -- cgit v1.2.3
subjectauthordateoperations