Commit 4545f798 authored by Dries's avatar Dries

- Patch #10103 by Gerhard: book module cleanup.
parent ef07dd08
...@@ -419,7 +419,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) { ...@@ -419,7 +419,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) { switch ($op) {
case 'view': case 'view':
if (!$teaser) { if (!$teaser) {
$book = db_fetch_object(db_query('SELECT * FROM {book} WHERE nid = %d', $node->nid)); $book = db_fetch_array(db_query('SELECT * FROM {book} WHERE nid = %d', $node->nid));
if ($book) { if ($book) {
foreach ($book as $key => $value) { foreach ($book as $key => $value) {
...@@ -454,7 +454,7 @@ function book_navigation($node) { ...@@ -454,7 +454,7 @@ function book_navigation($node) {
$output .= '<div class="book">'; $output .= '<div class="book">';
if ($tree = book_tree($node->nid)) { if ($tree = book_tree($node->nid)) {
$output .= '<div class="tree">'. book_tree($node->nid) .'</div>'; $output .= '<div class="tree">'. $tree .'</div>';
} }
if ($prev = book_prev($node)) { if ($prev = book_prev($node)) {
......
...@@ -419,7 +419,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) { ...@@ -419,7 +419,7 @@ function book_nodeapi(&$node, $op, $teaser, $page) {
switch ($op) { switch ($op) {
case 'view': case 'view':
if (!$teaser) { if (!$teaser) {
$book = db_fetch_object(db_query('SELECT * FROM {book} WHERE nid = %d', $node->nid)); $book = db_fetch_array(db_query('SELECT * FROM {book} WHERE nid = %d', $node->nid));
if ($book) { if ($book) {
foreach ($book as $key => $value) { foreach ($book as $key => $value) {
...@@ -454,7 +454,7 @@ function book_navigation($node) { ...@@ -454,7 +454,7 @@ function book_navigation($node) {
$output .= '<div class="book">'; $output .= '<div class="book">';
if ($tree = book_tree($node->nid)) { if ($tree = book_tree($node->nid)) {
$output .= '<div class="tree">'. book_tree($node->nid) .'</div>'; $output .= '<div class="tree">'. $tree .'</div>';
} }
if ($prev = book_prev($node)) { if ($prev = book_prev($node)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment