From bbab04378537957a57d72ed55120cf66a8df024b Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Mon, 14 Apr 2003 21:03:59 +0000 Subject: [PATCH] - Made book_tree_recurse() emit code that validates as XHTML. Patch by Nick Berendsen. --- modules/book.module | 7 ++++--- modules/book/book.module | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/modules/book.module b/modules/book.module index bee2643f09d0..6900e52ca2b3 100644 --- a/modules/book.module +++ b/modules/book.module @@ -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 } -?> \ No newline at end of file +?> diff --git a/modules/book/book.module b/modules/book/book.module index bee2643f09d0..6900e52ca2b3 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -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 } -?> \ No newline at end of file +?> -- GitLab