From 293daa48201d344b231c80a1659f13f421caf9e5 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 13 Apr 2005 18:50:57 +0000 Subject: - Patch #20451 by Moshe: some ancient code was assuming that all apges in a book are of type 'book'. --- modules/book.module | 2 +- modules/book/book.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/book.module b/modules/book.module index 16d2eec80..0a207c700 100644 --- a/modules/book.module +++ b/modules/book.module @@ -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"); diff --git a/modules/book/book.module b/modules/book/book.module index 16d2eec80..0a207c700 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -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"); -- cgit v1.2.3