summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2001-12-27 15:20:20 +0000
committerDries Buytaert <dries@buytaert.net>2001-12-27 15:20:20 +0000
commit4e25543a3dbf1a1111b4e4d019acce0e11f14614 (patch)
tree449c42423afb9ebd4a82cc60c00eb16cf25507e1
parent76cc8be622d5d13fd7d8446201ce63607f58aed4 (diff)
downloadbrdo-4e25543a3dbf1a1111b4e4d019acce0e11f14614.tar.gz
brdo-4e25543a3dbf1a1111b4e4d019acce0e11f14614.tar.bz2
- "fixed" the code's indentation.
-rw-r--r--modules/book.module32
-rw-r--r--modules/book/book.module32
2 files changed, 32 insertions, 32 deletions
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 .= "<li><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></li>";
+ if ($node) {
+ // output the content:
+ $output .= "<li><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></li>";
- // 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 = "<ul>$output</ul>";
+ $output = "<ul>$output</ul>";
}
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 .= "<li><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></li>";
+ if ($node) {
+ // output the content:
+ $output .= "<li><a href=\"node.php?id=$node->nid\">". check_output($node->title) ."</a></li>";
- // 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 = "<ul>$output</ul>";
+ $output = "<ul>$output</ul>";
}