diff --git a/taxonomy_menu.admin.inc b/taxonomy_menu.admin.inc
index 804d582..ca8bd66 100644
--- a/taxonomy_menu.admin.inc
+++ b/taxonomy_menu.admin.inc
@@ -180,71 +180,59 @@ function taxonomy_menu_form_taxonomy_form_vocabulary(&$form, &$form_state) {
* @see taxonomy_menu_form_taxonomy_form_vocabulary()
*/
function taxonomy_menu_vocab_submit($form, &$form_state) {
- // Initialize flag variables for updating/rebuilding the taxonomy menu.
- $update = FALSE;
- $insert = FALSE;
-
- $menu_disabled = $form_state['values']['taxonomy_menu']['vocab_parent'] == '0';
$vid = $form_state['values']['vid'];
+
// Flatten array of submitted settings so we can save them more easily.
$flatten_settings = _taxonomy_menu_flatten_form_settings($form_state['values']['taxonomy_menu']);
- // If menu location has been set to disabled, don't throw notices by trying to
- // explode 0 with ':' .
- $vocab_parent = $flatten_settings['vocab_parent'];
- $menu_location = ($vocab_parent == '0') ? '0:0' : $vocab_parent;
- list($flatten_settings['vocab_menu'], $flatten_settings['vocab_parent']) = explode(':', $menu_location);
-
- // Get all the settings that have changed since the last submit. If some of
- // them have changed, then update the taxonomy menu.
- $changed_settings = array();
- if ($vid != 0) {
- $changed_settings = _taxonomy_menu_get_changed_settings($flatten_settings, $vid);
- if (!empty($changed_settings)) {
- $update = TRUE;
- // Options have changed, save/update the menu.
- $menu_change = in_array('vocab_parent', $changed_settings) || in_array('vocab_menu', $changed_settings);
- if ($menu_change) {
- // Menu location has changed.
- if ($menu_disabled) {
- // Menu was disabled, delete all existing menu links.
- taxonomy_menu_menu_links_delete($vid);
- }
- else {
- // Menu location has been changed and is not disabled.
- $old_vocab_parent = taxonomy_menu_variable_get('vocab_parent', $vid, '0');
- $old_vocab_menu = taxonomy_menu_variable_get('vocab_menu', $vid, '0');
- if ($old_vocab_menu == '0' && $old_vocab_parent == '0') {
- // Menu was disabled before, create new links.
- $insert = TRUE;
- }
- }
- // Do a full menu rebuild in case we have removed or moved the menu.
- variable_set('menu_rebuild_needed', TRUE);
- }
- }
- elseif (!$flatten_settings['rebuild']) {
- // Display a notification message. Nothing to update.
- drupal_set_message(t('The Taxonomy menu was not updated. Nothing to update.'), 'status');
- }
+ // If menu location has been set to disabled, normalize to