diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-08-11 14:54:39 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-08-11 14:54:39 +0000 |
commit | 808b6b6cae71afd741023a0c08a6c925f2198752 (patch) | |
tree | d17e890898959601d841227fecd538f135371bfc /modules/comment/comment.module | |
parent | 876536a955b783c4f82185dc45557ef3b1bd949f (diff) | |
download | brdo-808b6b6cae71afd741023a0c08a6c925f2198752.tar.gz brdo-808b6b6cae71afd741023a0c08a6c925f2198752.tar.bz2 |
- 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).
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r-- | modules/comment/comment.module | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 873af4326..1ffb7a884 100644 --- a/modules/comment/comment.module +++ b/modules/comment/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 .= "<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"; while ($comment = db_fetch_object($result)) { - $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_username($comment->userid) ."</TD><TD>". format_date($comment->timestamp, "small") ."</TD><TD><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit comment</A></TD><TD><A HREF=\"admin.php?mod=comment&op=delete&id=$comment->cid\">delete comment</A></TD></TR>\n"; + $output .= " <TR><TD><A HREF=\"node.php?id=$comment->lid&cid=$comment->cid&pid=$comment->pid#$comment->cid\">". check_output($comment->subject) ."</A></TD><TD>". format_name($comment->name) ."</TD><TD>". format_date($comment->timestamp, "small") ."</TD><TD><A HREF=\"admin.php?mod=comment&op=edit&id=$comment->cid\">edit comment</A></TD><TD><A HREF=\"admin.php?mod=comment&op=delete&id=$comment->cid\">delete comment</A></TD></TR>\n"; } $output .= "</TABLE>\n"; |