summaryrefslogtreecommitdiff
path: root/modules/comment/comment.install
diff options
context:
space:
mode:
Diffstat (limited to 'modules/comment/comment.install')
-rw-r--r--modules/comment/comment.install26
1 files changed, 26 insertions, 0 deletions
diff --git a/modules/comment/comment.install b/modules/comment/comment.install
index 898016050..59bf81061 100644
--- a/modules/comment/comment.install
+++ b/modules/comment/comment.install
@@ -32,6 +32,32 @@ function comment_update_6001() {
}
/**
+ * Changed comment settings from global to per-node -- copy global
+ * settings to all node types.
+ */
+function comment_update_6002() {
+ $settings = array(
+ 'comment_default_mode' => COMMENT_MODE_THREADED_EXPANDED,
+ 'comment_default_order' => COMMENT_ORDER_NEWEST_FIRST,
+ 'comment_default_per_page' => 50,
+ 'comment_controls' => COMMENT_CONTROLS_HIDDEN,
+ 'comment_anonymous' => COMMENT_ANONYMOUS_MAYNOT_CONTACT,
+ 'comment_subject_field' => 1,
+ 'comment_preview' => COMMENT_PREVIEW_REQUIRED,
+ 'comment_form_location' => COMMENT_FORM_SEPARATE_PAGE,
+ );
+ $types = node_get_types();
+ foreach ($settings as $setting => $default) {
+ $value = variable_get($setting, $default);
+ foreach ($types as $type => $object) {
+ variable_set($setting .'_'. $type, $value);
+ }
+ variable_del($setting);
+ }
+ return array();
+}
+
+/**
* Implementation of hook_schema().
*/
function comment_schema() {