summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2008-12-04 10:57:17 +0000
committerDries Buytaert <dries@buytaert.net>2008-12-04 10:57:17 +0000
commitdc82bc5ab0a3a58efa3946602ba75a0ed05e2311 (patch)
treeae32ebed8a3af922e9bb60d640118d268c7de892 /modules/taxonomy/taxonomy.module
parent424aaef46cf5cfbbb404d596288f0e1425259be2 (diff)
downloadbrdo-dc82bc5ab0a3a58efa3946602ba75a0ed05e2311.tar.gz
brdo-dc82bc5ab0a3a58efa3946602ba75a0ed05e2311.tar.bz2
- Patch #341872 by mayer, catch: fixed bug in database conversion and added a missing test for taxonomy_term_save().
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index b68a63949..28f85d994 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -334,7 +334,9 @@ function taxonomy_term_save($term) {
$status = drupal_write_record('term_data', $term);
module_invoke_all('taxonomy_term_update', $term);
}
- db_delete('term_relation')->condition('tid1', $term->tid, 'OR')->condition('tid2', $term->tid)->execute();
+
+ $or = db_or()->condition('tid1', $term->tid)->condition('tid2', $term->tid);
+ db_delete('term_relation')->condition($or)->execute();
if (!empty($term->relations)) {
foreach ($term->relations as $related_id) {