Commit e6cf829e authored by Dries's avatar Dries

- Bugfix: show the 'printer-friendly version' link for everybody not just for

  people with the update book permission.  Patch by Nick Berendsen.
parent 3c2dc18c
......@@ -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.")));
}
......
......@@ -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.")));
}
......
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