Commit 35cde666 authored by greggles's avatar greggles

bug #624910 by neochief: more robust nid detection to support AJAX Comments

parent 95f73a26
......@@ -84,7 +84,7 @@ function comment_notify_form_alter(&$form, &$form_state, $form_id) {
}
// Only add the checkbox if this is an enabled content type
$node = node_load($form['nid']['#value']);
$node = node_load($form['nid']['#value'] ? $form['nid']['#value'] : $form['nid']['#default_value']);
$enabled_types = variable_get('comment_notify_node_types', array($node->type => TRUE));
if (empty($enabled_types[$node->type])) {
return;
......
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