summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 0a8150799..873af4326 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -53,6 +53,11 @@ function comment_overview() {
return $output;
}
+function comment_delete($id) {
+ db_query("DELETE FROM comments WHERE cid = '$id'");
+ watchdog("special", "comment: deleted '$id'");
+}
+
function comment_admin() {
global $op, $id, $edit, $mod, $keys, $order;
@@ -68,6 +73,10 @@ function comment_admin() {
print search_form($keys);
print search_data($keys, $mod);
break;
+ case "delete":
+ print comment_delete(check_input($id));
+ print comment_overview();
+ break;
case t("Submit"):
print status(comment_save(check_input($id), $edit));
print comment_overview();