Commit 5a3d3bfb authored by Dries's avatar Dries

- Fixed rendering bug in book module.  Reported by vmole at
  http://drupal.org/node.php?id=923.
parent 259f17c5
......@@ -496,7 +496,7 @@ function book_tree_recurse($nid, $depth, $children) {
function book_tree($parent = 0, $depth = 3) {
$result = db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE n.status = '1' ORDER BY b.weight, n.title");
$result = db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid 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();
......
......@@ -496,7 +496,7 @@ function book_tree_recurse($nid, $depth, $children) {
function book_tree($parent = 0, $depth = 3) {
$result = db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE n.status = '1' ORDER BY b.weight, n.title");
$result = db_query("SELECT n.nid, n.title, b.parent FROM node n LEFT JOIN book b ON n.nid = b.nid 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();
......
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