summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.admin.inc
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-02 04:39:16 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-11-02 04:39:16 +0000
commit1800edca1b8f3d4d19a2ed4b70f4946517fc2df6 (patch)
tree36141cfef136cb04850d94a42d42b68090b031d7 /modules/taxonomy/taxonomy.admin.inc
parent583163193d55e91cc6dedebf7a1c5d9f85dcc408 (diff)
downloadbrdo-1800edca1b8f3d4d19a2ed4b70f4946517fc2df6.tar.gz
brdo-1800edca1b8f3d4d19a2ed4b70f4946517fc2df6.tar.bz2
#251255 by catch, Jody Lynn, and roychri: Fixed re-ordering bug when taxonomy overview form is saved.
Diffstat (limited to 'modules/taxonomy/taxonomy.admin.inc')
-rw-r--r--modules/taxonomy/taxonomy.admin.inc12
1 files changed, 11 insertions, 1 deletions
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.