- Made book_tree_recurse() emit code that validates as XHTML. Patch by Nick
Berendsen.4.2.x
parent
a53e34e80e
commit
bbab043785
|
@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
|
||||||
if ($depth > 0) {
|
if ($depth > 0) {
|
||||||
if ($children[$nid]) {
|
if ($children[$nid]) {
|
||||||
foreach ($children[$nid] as $foo => $node) {
|
foreach ($children[$nid] as $foo => $node) {
|
||||||
$output .= "<li>". l($node->title, "node/view/$node->nid") ."</li>";
|
$output .= "<li>";
|
||||||
|
$output .= l($node->title, "node/view/$node->nid");
|
||||||
if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
|
if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
|
||||||
$output .= "<ul>$tree</ul>";
|
$output .= "<ul>$tree</ul>";
|
||||||
}
|
}
|
||||||
|
$output .= "</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
|
||||||
if ($depth > 0) {
|
if ($depth > 0) {
|
||||||
if ($children[$nid]) {
|
if ($children[$nid]) {
|
||||||
foreach ($children[$nid] as $foo => $node) {
|
foreach ($children[$nid] as $foo => $node) {
|
||||||
$output .= "<li>". l($node->title, "node/view/$node->nid") ."</li>";
|
$output .= "<li>";
|
||||||
|
$output .= l($node->title, "node/view/$node->nid");
|
||||||
if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
|
if ($tree = book_tree_recurse($node->nid, $depth - 1, $children)) {
|
||||||
$output .= "<ul>$tree</ul>";
|
$output .= "<ul>$tree</ul>";
|
||||||
}
|
}
|
||||||
|
$output .= "</li>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue