taxonomy_vocabulary_confirm_reset_alphabetical_submit

Versions
6 – 7
taxonomy_vocabulary_confirm_reset_alphabetical_submit($form, &$form_state)

Submit handler to reset a vocabulary to alphabetical order after confirmation.

See also

taxonomy_vocabulary_confirm_reset_alphabetical()

Code

modules/taxonomy/taxonomy.admin.inc, line 920

<?php
function taxonomy_vocabulary_confirm_reset_alphabetical_submit($form, &$form_state) {
  db_query('UPDATE {term_data} t SET weight = 0 WHERE vid = %d', $form_state['values']['vid']);
  drupal_set_message(t('Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name'])));
  watchdog('taxonomy', 'Reset vocabulary %name to alphabetical order.', array('%name' => $form_state['values']['name']), WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/content/taxonomy/'. $form_state['values']['vid'];
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.