- 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 ($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
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
|
@ -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
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Loading…
Reference in New Issue