Commit 6fc8d944 authored by Dries's avatar Dries

- Small bugfix

parent c37cfb01
......@@ -95,7 +95,7 @@ function book_block($op = 'list', $delta = 0) {
// Only display this block when the user is browsing a book:
if (arg(0) == 'book' && arg(1) == 'view' && $nid = arg(2)) {
$page = db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM {node} n INNER JOIN {book} b ON n.nid = b.nid"));
$page = db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE n.nid = %d", $nid));
$path = book_location($page);
$path[] = $page;
......
......@@ -95,7 +95,7 @@ function book_block($op = 'list', $delta = 0) {
// Only display this block when the user is browsing a book:
if (arg(0) == 'book' && arg(1) == 'view' && $nid = arg(2)) {
$page = db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM {node} n INNER JOIN {book} b ON n.nid = b.nid"));
$page = db_fetch_object(db_query("SELECT n.nid, n.title, b.parent FROM {node} n INNER JOIN {book} b ON n.nid = b.nid WHERE n.nid = %d", $nid));
$path = book_location($page);
$path[] = $page;
......
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