From f024db4d3d3c4e8e9f0f6b2adf0a3ed597ae0efc Mon Sep 17 00:00:00 2001
From: mr.baileys <mrbaileys@drupal.org>
Date: Wed, 1 Jun 2011 11:19:02 +0200
Subject: [PATCH] Remove support for nested arrays for term->parent from taxonomy_term_save().

---
 modules/taxonomy/taxonomy.module |   18 ++++--------------
 1 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 50d2fd6..6111ae0 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -582,20 +582,10 @@ function taxonomy_term_save($term) {
     $query = db_insert('taxonomy_term_hierarchy')
       ->fields(array('tid', 'parent'));
     foreach ($term->parent as $parent) {
-      if (is_array($parent)) {
-        foreach ($parent as $tid) {
-          $query->values(array(
-            'tid' => $term->tid,
-            'parent' => $tid
-          ));
-        }
-      }
-      else {
-        $query->values(array(
-          'tid' => $term->tid,
-          'parent' => $parent
-        ));
-      }
+      $query->values(array(
+        'tid' => $term->tid,
+        'parent' => $parent
+      ));
     }
     $query->execute();
   }
-- 
1.7.0.4

