function taxonomy_manager_form_submit in Taxonomy Manager 6
Same name and namespace in other branches
- 5 taxonomy_manager.module \taxonomy_manager_form_submit()
- 6.2 taxonomy_manager.admin.inc \taxonomy_manager_form_submit()
- 7 taxonomy_manager.admin.inc \taxonomy_manager_form_submit()
submits the taxonomy manager form (only search button)
File
- ./
taxonomy_manager.admin.inc, line 768
Code
function taxonomy_manager_form_submit($form, &$form_state) {
if ($form_state['values']['delete'] === TRUE) {
return taxonomy_manager_term_confirm_delete_submit($form, $form_state);
}
$search_string = $form_state['values']['search']['field'];
$terms = array();
$terms = taxonomy_manager_autocomplete_tags_get_tids($search_string, $form_state['values']['vid'], FALSE);
$term = array_shift($terms);
$tid = $term['tid'];
if ($tid) {
drupal_goto('admin/content/taxonomy_manager/voc/' . $form_state['values']['vid'] . '/' . $tid);
}
else {
drupal_goto('admin/content/taxonomy_manager/voc/' . $form_state['values']['vid'] . '/0/' . $search_string);
}
}