Commit 293daa48 authored by Dries's avatar Dries

- Patch #20451 by Moshe: some ancient code was assuming that all apges in a...

- Patch #20451 by Moshe: some ancient code was assuming that all apges in a book are of type 'book'.
parent 1bc5fe18
......@@ -55,7 +55,7 @@ function book_link($type, $node = 0, $main = 0) {
$links = array();
if ($type == 'node' && $node->type == 'book') {
if ($type == 'node' && isset($node->parent)) {
if (!$main) {
if (book_access('create', $node)) {
$links[] = l(t('add child page'), "node/add/book/parent/$node->nid");
......
......@@ -55,7 +55,7 @@ function book_link($type, $node = 0, $main = 0) {
$links = array();
if ($type == 'node' && $node->type == 'book') {
if ($type == 'node' && isset($node->parent)) {
if (!$main) {
if (book_access('create', $node)) {
$links[] = l(t('add child page'), "node/add/book/parent/$node->nid");
......
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