Commit 94bd042c authored by greggles's avatar greggles

bug #430428 by greggles: doesn't record subscription when only one...

bug #430428 by greggles: doesn't record subscription when only one notification type is enabled (one more example)
parent 2f3e944c
......@@ -134,7 +134,12 @@ function comment_notify_form_alter(&$form, &$form_state, $form_id) {
if ($form['cid']['#value'] != '') {
$notify = db_result(db_query("SELECT notify FROM {comment_notify} WHERE cid = %d", $form['cid']['#value']));
$form['notify']['#default_value'] = $notify;
$form['notify_type']['#default_value'] = $notify;
if (count($available_options) > 1) {
$form['notify_type']['#default_value'] = $notify;
}
else {
$form['notify_type']['#default_value'] = key($available_options);
}
}
$form['notify_close'] = array('#value' => '</div>', '#weight' => 9);
}
......
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