diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-04-21 07:29:26 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-04-21 07:29:26 +0000 |
commit | e6cf829eceec8a2f9e24a15598a538de5657a1fc (patch) | |
tree | f883a1f6e35b964d37f78201ff376d8d26747ce5 | |
parent | 3c2dc18c82fd6fc19d5e2e26bc1f28b0048f89a8 (diff) | |
download | brdo-e6cf829eceec8a2f9e24a15598a538de5657a1fc.tar.gz brdo-e6cf829eceec8a2f9e24a15598a538de5657a1fc.tar.bz2 |
- Bugfix: show the 'printer-friendly version' link for everybody not just for
people with the update book permission. Patch by Nick Berendsen.
-rw-r--r-- | modules/book.module | 6 | ||||
-rw-r--r-- | modules/book/book.module | 6 |
2 files changed, 8 insertions, 4 deletions
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."))); } |