From 808b6b6cae71afd741023a0c08a6c925f2198752 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 11 Aug 2001 14:54:39 +0000 Subject: - Changed the authentication and login scheme as discussed on the mailing list. - Fixed the export function in book.module (patch my Julian). - Fixed the comment alignment (comments got truncated). --- modules/comment.module | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'modules/comment.module') diff --git a/modules/comment.module b/modules/comment.module index 873af4326..1ffb7a884 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -2,9 +2,9 @@ function comment_search($keys) { global $user; - $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id 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.author = u.id 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" => (user_access("administer comments") ? "admin.php?mod=comment&op=edit&id=$comment->cid" : "node.php?id=$comment->lid&cid=$comment->cid"), "user" => $comment->userid, "date" => $comment->timestamp); + $find[$i++] = array("title" => check_output($comment->subject), "link" => (user_access("administer comments") ? "admin.php?mod=comment&op=edit&id=$comment->cid" : "node.php?id=$comment->lid&cid=$comment->cid"), "user" => $comment->name, "date" => $comment->timestamp); } return $find; } @@ -24,10 +24,10 @@ function comment_link($type) { function comment_edit($id) { global $REQUEST_URI; - $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.cid = '$id'"); + $result = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON c.author = u.id WHERE c.cid = '$id'"); $comment = db_fetch_object($result); - $form .= form_item(t("Author"), format_username($comment->userid)); + $form .= form_item(t("Author"), format_name($comment->name)); $form .= form_textfield(t("Subject"), "subject", $comment->subject, 50, 128); $form .= form_textarea(t("Comment"), "comment", $comment->comment, 50, 10); $form .= form_submit(t("Submit")); @@ -41,12 +41,12 @@ function comment_save($id, $edit) { } function comment_overview() { - $result = db_query("SELECT c.*, u.userid FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY timestamp DESC LIMIT 50"); + $result = db_query("SELECT c.*, u.name FROM comments c LEFT JOIN users u ON u.id = c.author ORDER BY timestamp DESC LIMIT 50"); $output .= "\n"; $output .= " \n"; while ($comment = db_fetch_object($result)) { - $output .= " \n"; + $output .= " \n"; } $output .= "
subjectauthordateoperations
lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."". format_username($comment->userid) ."". format_date($comment->timestamp, "small") ."cid\">edit commentcid\">delete comment
lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."". format_name($comment->name) ."". format_date($comment->timestamp, "small") ."cid\">edit commentcid\">delete comment
\n"; -- cgit v1.2.3