- 🇮🇹Italy uccio Turin
After 11 years of waiting for feedback I think I can close it!
Found a problem when adapting the code for another use. The logic that limits recursion depth doesn't seem to be right. The if() should wrap the foreach(). Something like this:
$query_result = db_query($sql, array(':mlid'=>$mlid) );
$this_level = array(
'nid' => $nid,
'title' => $title,
);
$current_recusion_level++;
if ( $current_recusion_level <= $max_recusion_level ){
foreach ( $query_result as $child ) {
$this_level['children'][] = _dolfinity_book_blocks_make_tree($child->mlid,$child->nid,$child->title,$current_recusion_level,$max_recusion_level);
}
}
return $this_level;
(This is an English version that doesn't render, of course.)
Closed: outdated
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
After 11 years of waiting for feedback I think I can close it!