diff options
author | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-02 20:36:57 +0000 |
---|---|---|
committer | Neil Drumm <drumm@3064.no-reply.drupal.org> | 2006-07-02 20:36:57 +0000 |
commit | c50d7bcbc8f49f0bbd04b494a994c7094f1be30d (patch) | |
tree | 0000315220654c1c97bc2d82a8af623bc7a3569b /modules | |
parent | d048681f03b495256dbd52672a2a6e717425a5b0 (diff) | |
download | brdo-c50d7bcbc8f49f0bbd04b494a994c7094f1be30d.tar.gz brdo-c50d7bcbc8f49f0bbd04b494a994c7094f1be30d.tar.bz2 |
#71613 by keve, fixing some PHP notices in the book module.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/book.module | 8 | ||||
-rw-r--r-- | modules/book/book.module | 8 |
2 files changed, 10 insertions, 6 deletions
diff --git a/modules/book.module b/modules/book.module index 96274581e..b4ade10bd 100644 --- a/modules/book.module +++ b/modules/book.module @@ -361,7 +361,7 @@ function book_outline_submit($form_id, $form_values) { */ function book_location($node, $nodes = array()) { $parent = db_fetch_object(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.nid = %d'), $node->parent)); - if ($parent->title) { + if (isset($parent->title)) { $nodes = book_location($parent, $nodes); $nodes[] = $parent; } @@ -499,6 +499,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) { */ function theme_book_navigation($node) { $output = ''; + $links = ''; if ($node->nid) { $tree = book_tree($node->nid); @@ -575,8 +576,9 @@ function book_toc($exclude = 0) { * This is a helper function for book_tree() */ function book_tree_recurse($nid, $depth, $children, $unfold = array()) { + $output = ''; if ($depth > 0) { - if ($children[$nid]) { + if (isset($children[$nid])) { foreach ($children[$nid] as $foo => $node) { if (in_array($node->nid, $unfold)) { if ($tree = book_tree_recurse($node->nid, $depth - 1, $children, $unfold)) { @@ -612,7 +614,7 @@ function book_tree($parent = 0, $depth = 3, $unfold = array()) { $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 AND n.moderate = 0 ORDER BY b.weight, n.title')); while ($node = db_fetch_object($result)) { - $list = $children[$node->parent] ? $children[$node->parent] : array(); + $list = isset($children[$node->parent]) ? $children[$node->parent] : array(); $list[] = $node; $children[$node->parent] = $list; } diff --git a/modules/book/book.module b/modules/book/book.module index 96274581e..b4ade10bd 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -361,7 +361,7 @@ function book_outline_submit($form_id, $form_values) { */ function book_location($node, $nodes = array()) { $parent = db_fetch_object(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.nid = %d'), $node->parent)); - if ($parent->title) { + if (isset($parent->title)) { $nodes = book_location($parent, $nodes); $nodes[] = $parent; } @@ -499,6 +499,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) { */ function theme_book_navigation($node) { $output = ''; + $links = ''; if ($node->nid) { $tree = book_tree($node->nid); @@ -575,8 +576,9 @@ function book_toc($exclude = 0) { * This is a helper function for book_tree() */ function book_tree_recurse($nid, $depth, $children, $unfold = array()) { + $output = ''; if ($depth > 0) { - if ($children[$nid]) { + if (isset($children[$nid])) { foreach ($children[$nid] as $foo => $node) { if (in_array($node->nid, $unfold)) { if ($tree = book_tree_recurse($node->nid, $depth - 1, $children, $unfold)) { @@ -612,7 +614,7 @@ function book_tree($parent = 0, $depth = 3, $unfold = array()) { $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 AND n.moderate = 0 ORDER BY b.weight, n.title')); while ($node = db_fetch_object($result)) { - $list = $children[$node->parent] ? $children[$node->parent] : array(); + $list = isset($children[$node->parent]) ? $children[$node->parent] : array(); $list[] = $node; $children[$node->parent] = $list; } |