function resource_conflict_form_submit in Resource Conflict 7.2
Same name and namespace in other branches
- 5.2 resource_conflict.module \resource_conflict_form_submit()
- 6.2 resource_conflict.module \resource_conflict_form_submit()
- 7.3 resource_conflict.module \resource_conflict_form_submit()
Submit the node_type_form
1 string reference to 'resource_conflict_form_submit'
- resource_conflict_form_alter in ./
resource_conflict.module - Implementation of hook_form_alter
File
- ./
resource_conflict.module, line 259
Code
function resource_conflict_form_submit($form, &$form_state) {
$type = $form_state['values']['type'];
$old_type = $form_state['values']['old_type'];
$conflict_types = variable_get("rc_types", array());
//unset old entry
if (!empty($old_type)) {
$key = array_search($old_type, $conflict_types);
unset($conflict_types[$key]);
}
//make new entry if this type is conflict handled
if ($form_state['values']['rc_type']) {
$conflict_types[] = $type;
}
variable_set("rc_types", $conflict_types);
}