From cdff29b0ab45123edab24a51f2258171aa9ae348 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Tue, 24 Aug 2004 03:22:26 +0000 Subject: Book.module: item didn't show up in parent selector. --- modules/book.module | 4 +++- modules/book/book.module | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/book.module b/modules/book.module index d62d33f90..b84c0df99 100644 --- a/modules/book.module +++ b/modules/book.module @@ -522,13 +522,15 @@ function book_toc($exclude = 0) { array_push($children[$node->parent], $node); } + $toc = array(); + // If the user is an administrator, add the top-level book page; // only administrators can start new books. if (user_access('administer nodes')) { $toc[0] = '<'. t('top-level') .'>'; } - $toc = book_toc_recurse(0, '', array(), $children, $exclude); + $toc = book_toc_recurse(0, '', $toc, $children, $exclude); return $toc; } diff --git a/modules/book/book.module b/modules/book/book.module index d62d33f90..b84c0df99 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -522,13 +522,15 @@ function book_toc($exclude = 0) { array_push($children[$node->parent], $node); } + $toc = array(); + // If the user is an administrator, add the top-level book page; // only administrators can start new books. if (user_access('administer nodes')) { $toc[0] = '<'. t('top-level') .'>'; } - $toc = book_toc_recurse(0, '', array(), $children, $exclude); + $toc = book_toc_recurse(0, '', $toc, $children, $exclude); return $toc; } -- cgit v1.2.3