From 1800edca1b8f3d4d19a2ed4b70f4946517fc2df6 Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 2 Nov 2009 04:39:16 +0000 Subject: #251255 by catch, Jody Lynn, and roychri: Fixed re-ordering bug when taxonomy overview form is saved. --- modules/taxonomy/taxonomy.admin.inc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/taxonomy/taxonomy.admin.inc b/modules/taxonomy/taxonomy.admin.inc index e605c8e81..6aed48909 100644 --- a/modules/taxonomy/taxonomy.admin.inc +++ b/modules/taxonomy/taxonomy.admin.inc @@ -493,7 +493,17 @@ function taxonomy_overview_terms_submit($form, &$form_state) { // Save all updated terms. foreach ($changed_terms as $changed) { $term = (object)$changed; - taxonomy_term_save($term); + // Update term_hierachy and term_data directly since we don't have a + // fully populated term object to save. + db_update('taxonomy_term_hierarchy') + ->fields(array('parent' => $term->parent)) + ->condition('tid', $term->tid, '=') + ->execute(); + + db_update('taxonomy_term_data') + ->fields(array('weight' => $term->weight)) + ->condition('tid', $term->tid, '=') + ->execute(); } // Update the vocabulary hierarchy to flat or single hierarchy. -- cgit v1.2.3