Skip to content
Snippets Groups Projects
Commit 9632b0b0 authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Fixed book preview problem.  Patch by Kjartan.
parent efe9006a
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment