- Bugfix: show the 'printer-friendly version' link for everybody not just for
people with the update book permission. Patch by Nick Berendsen.4.2.x
parent
3c2dc18c82
commit
e6cf829ece
|
@ -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.")));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue