summaryrefslogtreecommitdiff
path: root/modules/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-02-27 07:45:03 +0000
committerDries Buytaert <dries@buytaert.net>2001-02-27 07:45:03 +0000
commit4d31d27ff0d9270f03456d17f5387f60bc99c22d (patch)
tree351bcea4888fa43f6d754c038d6540579f2b993b /modules/comment.module
parent3364e843175848dc265d463eddcabcd9e2f620b2 (diff)
downloadbrdo-4d31d27ff0d9270f03456d17f5387f60bc99c22d.tar.gz
brdo-4d31d27ff0d9270f03456d17f5387f60bc99c22d.tar.bz2
- added comment index for performance sake
- improved comment module - code revision - improved backend module - moreover headlines now work - (automatically) stripped tabs and trailing whitespaces from Jeroen's theme.
Diffstat (limited to 'modules/comment.module')
-rw-r--r--modules/comment.module24
1 files changed, 8 insertions, 16 deletions
diff --git a/modules/comment.module b/modules/comment.module
index ef0bce34a..6038d5ed2 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -26,24 +26,16 @@ function comment_edit($id) {
$output .= "<FORM ACTION=\"admin.php?mod=comment&op=save&id=$id\" METHOD=\"post\">\n";
- $output .= "<P>\n";
- $output .= " <B>Author:</B><BR>\n";
- $output .= " ". format_username($comment->userid) ."\n";
- $output .= "</P>\n";
+ $output .= "<B>Author:</B><BR>\n";
+ $output .= format_username($comment->userid) ."<P>\n";
- $output .= "<P>\n";
- $output .= " <B>Subject:</B><BR>\n";
- $output .= " <INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" VALUE=\"". check_textfield($comment->subject) ."\">\n";
- $output .= "</P>\n";
+ $output .= "<B>Subject:</B><BR>\n";
+ $output .= "<INPUT TYPE=\"text\" NAME=\"subject\" SIZE=\"50\" VALUE=\"". check_textfield($comment->subject) ."\"><P>\n";
- $output .= "<P>\n";
$output .= "<B>Comment:</B><BR>\n";
- $output .= " <TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_textarea($comment->comment) ."</TEXTAREA>\n";
- $output .= "</P>\n";
+ $output .= "<TEXTAREA WRAP=\"virtual\" COLS=\"50\" ROWS=\"10\" NAME=\"comment\">". check_textarea($comment->comment) ."</TEXTAREA><P>\n";
- $output .= "<P>\n";
- $output .= " <INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
- $output .= "</P>\n";
+ $output .= "<INPUT TYPE=\"submit\" NAME=\"op\" VALUE=\"Save comment\">\n";
$output .= "</FORM>\n";
print $output;
@@ -51,7 +43,7 @@ function comment_edit($id) {
function comment_save($id, $subject, $comment) {
db_query("UPDATE comments SET subject = '". check_input($subject) ."', comment = '". check_input($comment) ."' WHERE cid = $id");
- watchdog("message", "comment: modified `$subject'");
+ watchdog("message", "comment: modified '$subject'");
}
function comment_display($order = "date") {
@@ -105,7 +97,7 @@ function comment_admin() {
break;
case "Save comment":
comment_save($id, $subject, $comment);
- comment_edit($id);
+ comment_display();
break;
case "Update":
comment_display($order);