diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-09 00:58:03 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2008-11-09 00:58:03 +0000 |
commit | 6da33f2055e7bf4e069565e94a0ce0575ff16e8e (patch) | |
tree | ae65bbb2bbacf7b0117277d947b9fe75caa9c5a8 /modules/taxonomy/taxonomy.module | |
parent | 88a6e82db1657c8f39cb6338a3c511c50b1a70b4 (diff) | |
download | brdo-6da33f2055e7bf4e069565e94a0ce0575ff16e8e.tar.gz brdo-6da33f2055e7bf4e069565e94a0ce0575ff16e8e.tar.bz2 |
#314147 follow-up by catch: Fixed typos with previous patch, and added tests.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 5dc0771bb..ffb126e4a 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -361,7 +361,7 @@ function taxonomy_term_save($term) { } } else { - db_insert('term_hierarchy')->field(array('tid' => $term_tid, 'parent' => $term->parent))->execute(); + db_insert('term_hierarchy')->fields(array('tid' => $term->tid, 'parent' => $term->parent))->execute(); } db_delete('term_synonym')->condition('tid', $term->tid)->execute(); @@ -685,8 +685,9 @@ function taxonomy_node_save($node, $terms) { if (!$typed_term_tid) { $edit = array('vid' => $vid, 'name' => $typed_term); - $status = taxonomy_term_save($edit); - $typed_term_tid = $edit['tid']; + $term = (object)$edit; + $status = taxonomy_term_save($term); + $typed_term_tid = $term->tid; } // Defend against duplicate, differently cased tags |