function taxonomy_manager_form_merge_submit in Taxonomy Manager 6
Same name and namespace in other branches
- 6.2 taxonomy_manager.admin.inc \taxonomy_manager_form_merge_submit()
Submit handler for merging terms
1 string reference to 'taxonomy_manager_form_merge_submit'
- taxonomy_manager_merge_form in ./
taxonomy_manager.admin.inc - form for merging terms
File
- ./
taxonomy_manager.admin.inc, line 955
Code
function taxonomy_manager_form_merge_submit($form, $form_state) {
$selected_tids = array();
$selected_tids = $form_state['values']['taxonomy']['manager']['tree']['selected_terms'];
$main_terms = taxonomy_manager_autocomplete_tags_get_tids($form_state['values']['merge']['main_term'], $form_state['values']['vid']);
$main_term = array_shift($main_terms);
$new_inserted = false;
if ($main_term['new']) {
$new_inserted = true;
}
$main_term_tid = $main_term['tid'];
taxonomy_manager_merge($main_term_tid, $selected_tids, $form_state['values']['merge']['options'], $new_inserted);
drupal_set_message("Terms merged");
}