summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-09-28 16:20:55 +0000
committerDries Buytaert <dries@buytaert.net>2001-09-28 16:20:55 +0000
commit0cce47f15f21f59ec77de41c76cf13eb2b2f4f74 (patch)
tree73dacf3105fb598058714ccad769e3b86b8b558f /modules/comment/comment.module
parent17c921259f61daac6cc0d10ea145d6882ea89514 (diff)
downloadbrdo-0cce47f15f21f59ec77de41c76cf13eb2b2f4f74.tar.gz
brdo-0cce47f15f21f59ec77de41c76cf13eb2b2f4f74.tar.bz2
- fixed small glitch in node_del()
- fixed small glitch in comment_del() - changed the API of the form() function. The first parameter, the "action"-attribute in the <form>-tag has been made optional. By default, it will be set to "$REQUEST_URI". Why? Because in 98% of the cases we would do: global $REQUEST_URI; $form = form($REQUEST_URI, $form_content); while we can do: $form = form($form_content); now. Update your modules (and sorry for the inconvenience)!
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index d420e5b69..d436009ae 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -22,7 +22,6 @@ function comment_link($type) {
}
function comment_edit($id) {
- global $REQUEST_URI;
$result = db_query("SELECT c.*, u.name, u.uid FROM comments c LEFT JOIN user u ON c.author = u.uid WHERE c.cid = '$id'");
$comment = db_fetch_object($result);
@@ -32,7 +31,7 @@ function comment_edit($id) {
$form .= form_textarea(t("Comment"), "comment", $comment->comment, 50, 10);
$form .= form_submit(t("Submit"));
- return form($REQUEST_URI, $form);
+ return form($form);
}
function comment_save($id, $edit) {
@@ -55,6 +54,7 @@ function comment_overview() {
function comment_delete($id) {
db_query("DELETE FROM comments WHERE cid = '$id'");
+ db_query("DELETE FROM moderate WHERE cid = '$id'");
watchdog("special", "comment: deleted '$id'");
}