Commit bbab0437 authored by Dries's avatar Dries

- Made book_tree_recurse() emit code that validates as XHTML.  Patch by Nick
  Berendsen.
parent a53e34e8
......@@ -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>";
}
}
}
......
......@@ -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>";
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment