diff options
author | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-08-24 03:22:26 +0000 |
---|---|---|
committer | Steven Wittens <steven@10.no-reply.drupal.org> | 2004-08-24 03:22:26 +0000 |
commit | cdff29b0ab45123edab24a51f2258171aa9ae348 (patch) | |
tree | bcfa0885690ca81203e8e8da3dc7612f38e2891f /modules | |
parent | ad13675a4f0e17aff2875efa13ca0c2b54af0b61 (diff) | |
download | brdo-cdff29b0ab45123edab24a51f2258171aa9ae348.tar.gz brdo-cdff29b0ab45123edab24a51f2258171aa9ae348.tar.bz2 |
Book.module: <top-level> item didn't show up in parent selector.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 4 | ||||
-rw-r--r-- | modules/book/book.module | 4 |
2 files changed, 6 insertions, 2 deletions
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; } |