function flatcomments_node_type_form_submit in Flatcomments 6.2
Same name and namespace in other branches
- 6 flatcomments.module \flatcomments_node_type_form_submit()
Handles comment display mode save for our custom option.
See also
1 string reference to 'flatcomments_node_type_form_submit'
- flatcomments_form_alter in ./
flatcomments.module - Implementation of hook_form_alter().
File
- ./
flatcomments.module, line 70 - Make comments replies to the node, regardless of the reply link used.
Code
function flatcomments_node_type_form_submit($form, &$form_state) {
// Change display mode 5 to 2 to have comments display correctly.
// Then save mode 5 in our variable for flatcomments use.
$node_type = trim($form_state['values']['type']);
if ($form_state['values']['comment_default_mode'] == 5) {
$form_state['values']['comment_default_mode'] = 4;
variable_set('flatcomments_default_mode_' . $node_type, 5);
}
else {
variable_set('flatcomments_default_mode_' . $node_type, 0);
}
}