summaryrefslogtreecommitdiff
path: root/modules/book
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-08-05 00:26:36 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-08-05 00:26:36 +0000
commitcd430165d706c6a747f81e663f756e60a4a0377f (patch)
tree88915ae0fe216462d071760a005489e9838fff77 /modules/book
parent6839ce965fb7ac37bf735a0b169009cca7529429 (diff)
downloadbrdo-cd430165d706c6a747f81e663f756e60a4a0377f.tar.gz
brdo-cd430165d706c6a747f81e663f756e60a4a0377f.tar.bz2
#73884 by RobRoy, various code cleanup.
Diffstat (limited to 'modules/book')
-rw-r--r--modules/book/book.module1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/book/book.module b/modules/book/book.module
index 584c78b5b..979dbf613 100644
--- a/modules/book/book.module
+++ b/modules/book/book.module
@@ -553,6 +553,7 @@ function book_toc_recurse($nid, $indent, $toc, $children, $exclude) {
function book_toc($exclude = 0) {
$result = db_query(db_rewrite_sql('SELECT n.nid, n.title, b.parent, b.weight FROM {node} n INNER JOIN {book} b ON n.vid = b.vid WHERE n.status = 1 ORDER BY b.weight, n.title'));
+ $children = array();
while ($node = db_fetch_object($result)) {
if (!$children[$node->parent]) {
$children[$node->parent] = array();