Commit 189056d0 authored by greggles's avatar greggles

bug #417582 by geggles: if only one subscription mode is enabled, users should...

bug #417582 by geggles: if only one subscription mode is enabled, users should only see one option in their edit page
parent f88d1332
......@@ -292,15 +292,13 @@ function comment_notify_user($type, &$edit, &$user, $category = NULL) {
'#description' => t('Check this box to receive an e-mail notification for follow-ups on your nodes (pages, forum topics, etc). You can not disable notifications for individual threads.')
);
$available_options[COMMENT_NOTIFY_DISABLED] = t('No notifications');
$available_options += _comment_notify_options();
$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'] : variable_get('comment_notify_default_registered_mailalert', COMMENT_NOTIFY_DISABLED),
'#options' => array(
COMMENT_NOTIFY_DISABLED => t('No notifications'),
COMMENT_NOTIFY_NODE => t('All comments'),
COMMENT_NOTIFY_COMMENT => t('Replies to my comment')
),
'#options' => $available_options,
'#description' => t("Check this box to receive e-mail notification for follow-up comments to comments you posted. You can later disable this on a post-by-post basis... so if you leave this to YES, you can still disable follow-up notifications for comments you don't want follow-up mails anymore - i.e. for very popular posts.")
);
return $form;
......@@ -584,12 +582,8 @@ function comment_notify_settings() {
)
);
$available_options = array(
COMMENT_NOTIFY_DISABLED => t('No notifications'),
COMMENT_NOTIFY_NODE => t('All comments'),
COMMENT_NOTIFY_COMMENT => t('Replies to my comment')
);
$available_options[COMMENT_NOTIFY_DISABLED] = t('No notifications');
$available_options += _comment_notify_options();
$form['comment_notify_settings']['comment_notify_default_anon_mailalert'] = array(
'#type' => 'select',
'#title' => t('Default state for the notification selection box for anonymous users'),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment