#251255 by catch, Jody Lynn, and roychri: Fixed re-ordering bug when taxonomy overview form is saved.
parent
583163193d
commit
1800edca1b
|
@ -493,7 +493,17 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
|
||||||
// Save all updated terms.
|
// Save all updated terms.
|
||||||
foreach ($changed_terms as $changed) {
|
foreach ($changed_terms as $changed) {
|
||||||
$term = (object)$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.
|
// Update the vocabulary hierarchy to flat or single hierarchy.
|
||||||
|
|
Loading…
Reference in New Issue