Commit 9632b0b0 authored by Dries's avatar Dries

- Fixed book preview problem.  Patch by Kjartan.
parent efe9006a
...@@ -49,7 +49,7 @@ function book_access($op, $node) { ...@@ -49,7 +49,7 @@ function book_access($op, $node) {
/* /*
** Only registered users can update book pages. Given the nature ** Only registered users can update book pages. Given the nature
** of the book module this is considered to be a good/safe idea. ** of the book module this is considered to be a good/safe idea.
** One can only upate a book page if there are no suggested updates ** One can only update a book page if there are no suggested updates
** of that page waiting for approval, when it is not a PHP-page and ** of that page waiting for approval, when it is not a PHP-page and
** as long as the "create new revision"-bit is set. That is, only ** as long as the "create new revision"-bit is set. That is, only
** updates that don't overwrite the current or pending information ** updates that don't overwrite the current or pending information
...@@ -355,7 +355,7 @@ function book_content($node) { ...@@ -355,7 +355,7 @@ function book_content($node) {
** the moderation queue. ** the moderation queue.
*/ */
if ($node->moderate && arg(0) != "queue") { if ($op != t("Preview") && $node->moderate && arg(0) != "queue") {
$revision = book_revision_load($node, array("moderate" => 0, "status" => 1)); $revision = book_revision_load($node, array("moderate" => 0, "status" => 1));
if ($revision) { if ($revision) {
......
...@@ -49,7 +49,7 @@ function book_access($op, $node) { ...@@ -49,7 +49,7 @@ function book_access($op, $node) {
/* /*
** Only registered users can update book pages. Given the nature ** Only registered users can update book pages. Given the nature
** of the book module this is considered to be a good/safe idea. ** of the book module this is considered to be a good/safe idea.
** One can only upate a book page if there are no suggested updates ** One can only update a book page if there are no suggested updates
** of that page waiting for approval, when it is not a PHP-page and ** of that page waiting for approval, when it is not a PHP-page and
** as long as the "create new revision"-bit is set. That is, only ** as long as the "create new revision"-bit is set. That is, only
** updates that don't overwrite the current or pending information ** updates that don't overwrite the current or pending information
...@@ -355,7 +355,7 @@ function book_content($node) { ...@@ -355,7 +355,7 @@ function book_content($node) {
** the moderation queue. ** the moderation queue.
*/ */
if ($node->moderate && arg(0) != "queue") { if ($op != t("Preview") && $node->moderate && arg(0) != "queue") {
$revision = book_revision_load($node, array("moderate" => 0, "status" => 1)); $revision = book_revision_load($node, array("moderate" => 0, "status" => 1));
if ($revision) { if ($revision) {
......
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