- Made book_tree_recurse() emit code that validates as XHTML. Patch by Nick

Berendsen.
4.2.x
Dries Buytaert 2003-04-14 21:03:59 +00:00
parent a53e34e80e
commit bbab043785
2 changed files with 8 additions and 6 deletions

View File

@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
if ($depth > 0) {
if ($children[$nid]) {
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)) {
$output .= "<ul>$tree</ul>";
}
$output .= "</li>";
}
}
}
@ -756,4 +757,4 @@ function book_help() {
</ul>
<?php
}
?>
?>

View File

@ -480,11 +480,12 @@ function book_tree_recurse($nid, $depth, $children) {
if ($depth > 0) {
if ($children[$nid]) {
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)) {
$output .= "<ul>$tree</ul>";
}
$output .= "</li>";
}
}
}
@ -756,4 +757,4 @@ function book_help() {
</ul>
<?php
}
?>
?>