summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
authorDries <dries@buytaert.net>2012-01-23 09:01:44 -0500
committerDries <dries@buytaert.net>2012-01-23 09:01:44 -0500
commitaf8bd618722a38e8aafc6732b0efacd362b3e631 (patch)
treefb861e28350c58dc49827fda00b7f12ac33c205b /modules/taxonomy/taxonomy.module
parent9318096df2f22e59f993c48db932c39a15bcc41f (diff)
downloadbrdo-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.module6
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;