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.module14
1 files changed, 13 insertions, 1 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index effac37d1..e9fde950c 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -1490,4 +1490,16 @@ function comment_update_index() {
return array("last_update" => "comment_cron_last", "node_type" => "comment", "select" => "SELECT c.cid as lno, c.subject as text1, c.comment as text2 FROM comments c WHERE c.status = 0 AND timestamp > ". variable_get("comment_cron_last", 1));
}
-?>
+function comment_nodeapi(&$node, $op, $arg = 0) {
+ switch ($op) {
+ case "form":
+ if ($arg == "admin" && user_access("administer comments")) {
+ return form_select(t("Allow user comments"), "comment", $node->comment, array(t("Disabled"), t("Read only"), t("Read-write")));
+ }
+ break;
+ case "fields":
+ return array("comment");
+ }
+}
+
+?> \ No newline at end of file