If moving some words in a vocabulary, the code do not check if the vocabulary is a multi-hierarchy-voc. So it is posible the create unwanted a multi-hierarchy.

The code below is working and force the typed text for parent(s) to be a single word, not a few words.

file: taxonomy_manager.module
function: taxonomy_manager_form_submit()
code line 823 (last case-part for move):

    
    # ....

    case t('Move'):
      $voc = taxonomy_get_vocabulary($form_values['vid']);
      # is this not a multi hierarchy vocabulary?
      if ($voc->hierarchy != 2) {
      	if (strpos($form_values['move']['parents'], ',') !== FALSE) {
      		# If comma is in typed text  use "..."
      		$form_values['move']['parents'] = '"'.str_replace('"', '',
$form_values['move']['parents']).'"';
      	}
      }
      $typed_parents =
taxonomy_manager_autocomplete_tags_get_tids($form_values['move']['parents'],
$form_values['vid']);
      $parents = array();
      foreach ($typed_parents as $parent_info) {
        $parents[] = $parent_info['tid'];
      }
      if (count($parents) == 0) $parents[0] = 0; //if empty, delete all
parents
      taxonomy_manager_move($parents, $selected_tids,
$form_values['move']['options']);
      
      drupal_set_message("Terms moved");
      break;
      
  }
  
  drupal_goto('admin/content/taxonomy_manager/'. $form_values['vid']);
}
// end of function taxonomy_manager_form_submit()

Comments

ivnish’s picture

Status: Active » Closed (outdated)