summaryrefslogtreecommitdiff
path: root/modules/book.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/book.module')
-rw-r--r--modules/book.module10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/book.module b/modules/book.module
index 320f1f88f..129857251 100644
--- a/modules/book.module
+++ b/modules/book.module
@@ -142,7 +142,7 @@ function book_view($node, $main = 0) {
*/
if ($node->moderate && $mod != "queue") {
- $node = $node->revisions[sizeof($node->revisions) - 1]["node"];
+ $node = node_revision_load($node, end(node_revision_list($node)));
}
/*
@@ -233,7 +233,7 @@ function book_tree($parent = "", $depth = 0) {
// take the most recent approved revision:
if ($node->moderate) {
- $node = $node->revisions[sizeof($node->revisions) - 1]["node"];
+ $node = node_revision_load($node, end(node_revision_list($node)));
}
// output the content:
@@ -260,7 +260,7 @@ function book_render() {
// take the most recent approved revision:
if ($node->moderate) {
- $node = $node->revisions[sizeof($node->revisions) - 1]["node"];
+ $node = node_revision_load($node, end(node_revision_list($node)));
}
// output the content:
@@ -300,7 +300,7 @@ function book_export_html($id = "", $depth = 1) {
// take the most recent approved revision:
if ($node->moderate) {
- $node = $node->revisions[sizeof($node->revisions) - 1]["node"];
+ $node = node_revision_load($node, end(node_revision_list($node)));
}
// output the content:
@@ -325,7 +325,7 @@ function book_export_html_recursive($parent = "", $depth = 1) {
// take the most recent approved revision:
if ($node->moderate) {
- $node = $node->revisions[sizeof($node->revisions) - 1]["node"];
+ $node = node_revision_load($node, end(node_revision_list($node)));
}
// output the content: