diff options
author | Dries Buytaert <dries@buytaert.net> | 2004-06-15 18:41:25 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2004-06-15 18:41:25 +0000 |
commit | 5ba08f61c21adff0faf7518a879c6c60a674d58f (patch) | |
tree | 27feacf06fbbd8d3e53904eb4248d200d3daa8fa /modules | |
parent | d80d2d6e2df3230cceeb377169daac93e3e5b494 (diff) | |
download | brdo-5ba08f61c21adff0faf7518a879c6c60a674d58f.tar.gz brdo-5ba08f61c21adff0faf7518a879c6c60a674d58f.tar.bz2 |
- Patch #8418 by Axel: don't insert tid=0's in the database
Diffstat (limited to 'modules')
-rw-r--r-- | modules/taxonomy.module | 4 | ||||
-rw-r--r-- | modules/taxonomy/taxonomy.module | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/modules/taxonomy.module b/modules/taxonomy.module index cb425eb53..1ece8c28a 100644 --- a/modules/taxonomy.module +++ b/modules/taxonomy.module @@ -392,7 +392,9 @@ function taxonomy_node_save($nid, $terms) { if ($terms) { foreach ($terms as $term) { - db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term); + if ($term) { + db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term); + } } } } diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index cb425eb53..1ece8c28a 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -392,7 +392,9 @@ function taxonomy_node_save($nid, $terms) { if ($terms) { foreach ($terms as $term) { - db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term); + if ($term) { + db_query("INSERT INTO {term_node} (nid, tid) VALUES (%d, %d)", $nid, $term); + } } } } |