From e6cf829eceec8a2f9e24a15598a538de5657a1fc Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Mon, 21 Apr 2003 07:29:26 +0000 Subject: - Bugfix: show the 'printer-friendly version' link for everybody not just for people with the update book permission. Patch by Nick Berendsen. --- modules/book.module | 6 ++++-- modules/book/book.module | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'modules') diff --git a/modules/book.module b/modules/book.module index 6900e52ca..5153ee9b2 100644 --- a/modules/book.module +++ b/modules/book.module @@ -66,8 +66,10 @@ function book_link($type, $node = 0, $main = 0) { $links[] = l(t("create book page"), "node/add/book", array("title" => t("Add a new book page."))); } - if ($type == "node" && $node->type == "book" && book_access("update", $node)) { - $links[] = l(t("edit this page"), "node/edit/$node->nid", array("title" => t("Suggest an update for this book page."))); + if ($type == "node" && $node->type == "book") { + if (book_access("update", $node)) { + $links[] = l(t("edit this page"), "node/edit/$node->nid", array("title" => t("Suggest an update for this book page."))); + } $links[] = l(t("printer-friendly version"), "book/print/$node->nid", array("title" => t("Show a printer-friendly version of this book page and its sub-pages."))); } diff --git a/modules/book/book.module b/modules/book/book.module index 6900e52ca..5153ee9b2 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -66,8 +66,10 @@ function book_link($type, $node = 0, $main = 0) { $links[] = l(t("create book page"), "node/add/book", array("title" => t("Add a new book page."))); } - if ($type == "node" && $node->type == "book" && book_access("update", $node)) { - $links[] = l(t("edit this page"), "node/edit/$node->nid", array("title" => t("Suggest an update for this book page."))); + if ($type == "node" && $node->type == "book") { + if (book_access("update", $node)) { + $links[] = l(t("edit this page"), "node/edit/$node->nid", array("title" => t("Suggest an update for this book page."))); + } $links[] = l(t("printer-friendly version"), "book/print/$node->nid", array("title" => t("Show a printer-friendly version of this book page and its sub-pages."))); } -- cgit v1.2.3