Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In the foreach loop the following statement is being executed during every run. It should be placed right after $max_depth is being calculated.
if ($max_depth > $depth) {
Comment | File | Size | Author |
---|---|---|---|
#7 | taxonomy_get_tree-D6.patch | 1.49 KB | andypost |
#4 | taxonomy_get_tree.patch | 1.48 KB | JeremyFrench |
#2 | taxonomy_get_tree.patch | 1.48 KB | JeremyFrench |
Comments
Comment #1
XanoKick.
Comment #2
JeremyFrench CreditAttribution: JeremyFrench commentedChanged this and also put the two ifs outside the loop into one patch uploaded
Comment #3
Damien Tournoud CreditAttribution: Damien Tournoud commentedOh my, yes! ;)
Thanks for the patch.
A minor point:
By convention, we use
&&
instead ofand
, and we encourage "to always use curly braces even in situations where they are technically optional, as it increases readability and decreases the likelihood of logic errors".Comment #4
JeremyFrench CreditAttribution: JeremyFrench commentedI have changed the "and" to "&&" but I am not sure where I have missed out a curly brace, should I split the if into to statements?
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedLet's get this one in.
Comment #6
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks.
Comment #7
andypostSuppose this one should be ported
Comment #8
andypostJust a tag
Comment #9
brianV CreditAttribution: brianV commentedPort looks good. Setting to RTBC to be committed.
Comment #10
Gábor HojtsyCommitted to Drupal 6, thanks.