--- ../../../../../cvsmaster/sites/all/modules/taxonomy_batch_operations/taxonomy_batch_operations.module	2007-02-14 03:55:52.000000000 +0100
+++ taxonomy_batch_operations.module	2007-04-20 13:42:19.000000000 +0200
@@ -115,8 +115,8 @@ function taxonomy_batch_operations_overv
       '#default_value' => $term->weight,
     );
     $form['multiedit'][$term->tid]['operations'] = array(
-      '#value' => l(t('edit'), "admin/taxonomy/edit/term/$term->tid", array(), $destination) . ' | ' .
-                  l(t('delete'), "admin/taxonomy/delete/term/$term->tid", array(), $destination),
+      '#value' => l(t('edit'), "admin/content/taxonomy/edit/term/$term->tid", array(), $destination) . ' | ' .
+                  l(t('delete'), "admin/content/taxonomy/delete/term/$term->tid", array(), $destination),
     );
     $form['multiedit'][$term->tid]['check'] = array(
       '#type' => 'checkbox',
@@ -240,6 +240,7 @@ function taxonomy_batch_operations_form_
     case 'Save':
       foreach ($form_values[multiedit] as $key => $tid) {
         $term = taxonomy_get_term($key);
+        $parents = taxonomy_get_parents($key);
         unset($tid['check']);
         $tid['tid'] = $term->tid; 
         $tid['name'] = $term->name;
@@ -247,7 +248,7 @@ function taxonomy_batch_operations_form_
         $tid['synonyms'] = $term->synonyms;
         // weight is already set
         $tid['vid'] = $term->vid;
-        $tid['parent'] = $term->parent;
+        $tid['parent'] = array_keys($parents);
 
         taxonomy_save_term($tid);
       }
@@ -258,7 +259,7 @@ function taxonomy_batch_operations_form_
         if ($tid['check'] == 1)
           $tids[] = $key;
       }
-      return "admin/taxonomy/delete/terms/".implode($tids, ',');       
+      return "admin/content/taxonomy/delete/terms/".implode($tids, ',');       
       break;
   }
 
@@ -329,7 +330,7 @@ function taxonomy_add_multiple_terms_for
   $terms = explode("\n", $form_values['name']);
  
   foreach ($terms as $key => $term) {
-    $term = trim($term); // keep ending up with a trailing space, haven't tracked it down
+    //OS $term = trim($term); // keep ending up with a trailing space, haven't tracked it down
 
     // strip of prefix and suffix, if necessary
     if (!empty($form_values['prefix']) && strpos($term, $form_values['prefix']) === 0)
@@ -340,7 +341,7 @@ function taxonomy_add_multiple_terms_for
 
     // create our term array to pass to taxonomy_save_term
     if (trim($term) != "") {
-      $values[$key]['name'] = $term;
+      $values[$key]['name'] = trim($term); //OS
       $values[$key]['description'] = '';
       $values[$key]['synonyms'] = '';
       $values[$key]['weight'] = 0;
