? 229582_control_registered_default.patch
Index: comment_notify.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/comment_notify/comment_notify.module,v
retrieving revision 1.8.2.17
diff -u -p -r1.8.2.17 comment_notify.module
--- comment_notify.module	8 Oct 2008 16:43:05 -0000	1.8.2.17
+++ comment_notify.module	8 Oct 2008 16:55:46 -0000
@@ -128,7 +128,7 @@ function comment_notify_form_alter($form
     $form['notify'] = array(
       '#type' => 'select',
       '#title' => t('Notify me of follow-up comments posted here.'),
-      '#default_value' => variable_get('comment_notify_default_anon_mailalert', FALSE),
+      '#default_value' => variable_get('comment_notify_default_anon_mailalert', COMMENT_NOTIFY_DISABLED),
       '#options' => $available_options,
     );
   }
@@ -137,7 +137,7 @@ function comment_notify_form_alter($form
     $form['notify'] = array(
       '#type' => 'select',
       '#title' => t('Notify me of follow-up comments posted here.'),
-      '#default_value' => !empty($user->comment_notify_mailalert) ? $user->comment_notify_mailalert : variable_get('comment_notify_default_anon_mailalert', FALSE),
+      '#default_value' => !empty($user->comment_notify_mailalert) ? $user->comment_notify_mailalert : variable_get('comment_notify_default_registered_mailalert', COMMENT_NOTIFY_DISABLED),
       '#options' => $available_options,
       '#description' => t('You can change the default for this field in "Comment follow-up notification settings" on <a href="!uri">your account edit page</a>', array('!uri' => url('user/'. $user->uid .'/edit'))),
     );
@@ -306,7 +306,7 @@ function comment_notify_user($type, &$ed
         $form['comment_notify_settings']['comment_notify_mailalert'] = array(
           '#type' => 'select',
           '#title' => t('Receive comment follow-up notification e-mails'),
-          '#default_value' => isset($edit['comment_notify_mailalert']) ? $edit['comment_notify_mailalert'] : FALSE,
+          '#default_value' => isset($edit['comment_notify_mailalert']) ? $edit['comment_notify_mailalert'] : variable_get('comment_notify_default_registered_mailalert', COMMENT_NOTIFY_NODE),
           '#options' => array(
             COMMENT_NOTIFY_DISABLED => t('No notifications'),
             COMMENT_NOTIFY_NODE     => t('For all comments on this post'),
@@ -534,17 +534,28 @@ function comment_notify_settings() {
     )
   );
 
+  $available_options = array(
+    COMMENT_NOTIFY_DISABLED => t('No notifications'),
+    COMMENT_NOTIFY_NODE     => t('For all comments on this post'),
+    COMMENT_NOTIFY_COMMENT  => t('Just for replies to my comment')
+  );
+
   $form['comment_notify_settings']['comment_notify_default_anon_mailalert'] = array(
     '#type' => 'select',
     '#title' => t('Default state for the notification selection box for anonymous users.'),
     '#return_value' => 1,
-    '#default_value' => variable_get('comment_notify_default_anon_mailalert', array(COMMENT_NOTIFY_NODE, COMMENT_NOTIFY_COMMENT)),
+    '#default_value' => variable_get('comment_notify_default_anon_mailalert', COMMENT_NOTIFY_NODE),
     '#description' => t('This flag presets the flag for the follow-up notification on the form that anon users will see when posting a comment'),
-    '#options' => array(
-      COMMENT_NOTIFY_DISABLED => t('No notifications'),
-      COMMENT_NOTIFY_NODE     => t('For all comments on this post'),
-      COMMENT_NOTIFY_COMMENT  => t('Just for replies to my comment')
-    )
+    '#options' => $available_options,
+  );
+
+  $form['comment_notify_settings']['comment_notify_default_registered_mailalert'] = array(
+    '#type' => 'select',
+    '#title' => t('Default state for the notification selection box for registered users.'),
+    '#return_value' => 1,
+    '#default_value' => variable_get('comment_notify_default_registered_mailalert', COMMENT_NOTIFY_NODE),
+    '#description' => t('This flag presets the flag for the follow-up notification on the form that anon users will see when posting a comment'),
+    '#options' => $available_options,
   );
 
   $form['comment_notify_settings']['comment_notify_default_mailtext'] = array(
