From 4e25543a3dbf1a1111b4e4d019acce0e11f14614 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 27 Dec 2001 15:20:20 +0000 Subject: - "fixed" the code's indentation. --- modules/book.module | 32 ++++++++++++++++---------------- modules/book/book.module | 32 ++++++++++++++++---------------- 2 files changed, 32 insertions(+), 32 deletions(-) (limited to 'modules') diff --git a/modules/book.module b/modules/book.module index fb1d47e52..b463dd43f 100644 --- a/modules/book.module +++ b/modules/book.module @@ -459,27 +459,27 @@ function book_tree($parent = "", $depth = 0) { ** Select all child nodes and render them into a table of contents: */ - $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = '$parent' AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title"); + $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = '$parent' AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title"); - while ($page = db_fetch_object($result)) { - // load the node: - $node = node_load(array("nid" => $page->nid)); + while ($page = db_fetch_object($result)) { + // load the node: + $node = node_load(array("nid" => $page->nid)); - // take the most recent approved revision: - if ($node->moderate) { - $node = book_revision_load($node, array("moderate" => 0, "status" => 1)); - } + // take the most recent approved revision: + if ($node->moderate) { + $node = book_revision_load($node, array("moderate" => 0, "status" => 1)); + } - if ($node) { - // output the content: - $output .= "
  • nid\">". check_output($node->title) ."
  • "; + if ($node) { + // output the content: + $output .= "
  • nid\">". check_output($node->title) ."
  • "; - // build the sub-tree of each child: - $output .= book_tree($node->nid, $depth + 1); - } - } + // build the sub-tree of each child: + $output .= book_tree($node->nid, $depth + 1); + } + } - $output = ""; + $output = ""; } diff --git a/modules/book/book.module b/modules/book/book.module index fb1d47e52..b463dd43f 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -459,27 +459,27 @@ function book_tree($parent = "", $depth = 0) { ** Select all child nodes and render them into a table of contents: */ - $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = '$parent' AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title"); + $result = db_query("SELECT n.nid FROM node n LEFT JOIN book b ON n.nid = b.nid WHERE b.parent = '$parent' AND (n.moderate = 0 OR n.revisions != '') ORDER BY b.weight, n.title"); - while ($page = db_fetch_object($result)) { - // load the node: - $node = node_load(array("nid" => $page->nid)); + while ($page = db_fetch_object($result)) { + // load the node: + $node = node_load(array("nid" => $page->nid)); - // take the most recent approved revision: - if ($node->moderate) { - $node = book_revision_load($node, array("moderate" => 0, "status" => 1)); - } + // take the most recent approved revision: + if ($node->moderate) { + $node = book_revision_load($node, array("moderate" => 0, "status" => 1)); + } - if ($node) { - // output the content: - $output .= "
  • nid\">". check_output($node->title) ."
  • "; + if ($node) { + // output the content: + $output .= "
  • nid\">". check_output($node->title) ."
  • "; - // build the sub-tree of each child: - $output .= book_tree($node->nid, $depth + 1); - } - } + // build the sub-tree of each child: + $output .= book_tree($node->nid, $depth + 1); + } + } - $output = ""; + $output = ""; } -- cgit v1.2.3