diff options
author | Dries <dries@buytaert.net> | 2012-01-23 09:01:44 -0500 |
---|---|---|
committer | Dries <dries@buytaert.net> | 2012-01-23 09:01:44 -0500 |
commit | af8bd618722a38e8aafc6732b0efacd362b3e631 (patch) | |
tree | fb861e28350c58dc49827fda00b7f12ac33c205b /modules/taxonomy/taxonomy.module | |
parent | 9318096df2f22e59f993c48db932c39a15bcc41f (diff) | |
download | brdo-af8bd618722a38e8aafc6732b0efacd362b3e631.tar.gz brdo-af8bd618722a38e8aafc6732b0efacd362b3e631.tar.bz2 |
- Patch #1330554 by oriol_e9g, fiftyz, richthegeek: Fixed taxonomy_get_tree() incorrect depth on multiple parents.
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r-- | modules/taxonomy/taxonomy.module | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index 7c11bccaf..ccbd7c523 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1026,9 +1026,9 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities break; } $term = $load_entities ? $term_entities[$child] : $terms[$vid][$child]; - if (count($parents[$vid][$term->tid]) > 1) { - // We have a term with multi parents here. Clone the term, - // so that the depth attribute remains correct. + if (isset($parents[$vid][$term->tid])) { + // Clone the term so that the depth attribute remains correct + // in the event of multiple parents. $term = clone $term; } $term->depth = $depth; |