summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/book.module2
-rw-r--r--modules/book/book.module2
2 files changed, 2 insertions, 2 deletions
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");