- 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
Dries Buytaert 2003-04-21 07:29:26 +00:00
parent 3c2dc18c82
commit e6cf829ece
2 changed files with 8 additions and 4 deletions

View File

@ -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.")));
}

View File

@ -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.")));
}