diff options
-rw-r--r-- | modules/book.module | 6 | ||||
-rw-r--r-- | modules/book/book.module | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/book.module b/modules/book.module index b950268f8..2b7a33eea 100644 --- a/modules/book.module +++ b/modules/book.module @@ -634,12 +634,12 @@ function book_render() { * - an integer representing the node id (nid) of the node to export * */ -function book_export($type = 'html', $nid = 0) { +function book_export($type = 'html', $nid = FALSE) { global $base_url; $type = drupal_strtolower($type); - if ($nid) { + $node = node_load($nid); + if ($node) { $depth = _book_get_depth($nid); - $node = node_load($nid); switch ($type) { case 'docbook': $xml = "<?xml version='1.0'?>\n"; diff --git a/modules/book/book.module b/modules/book/book.module index b950268f8..2b7a33eea 100644 --- a/modules/book/book.module +++ b/modules/book/book.module @@ -634,12 +634,12 @@ function book_render() { * - an integer representing the node id (nid) of the node to export * */ -function book_export($type = 'html', $nid = 0) { +function book_export($type = 'html', $nid = FALSE) { global $base_url; $type = drupal_strtolower($type); - if ($nid) { + $node = node_load($nid); + if ($node) { $depth = _book_get_depth($nid); - $node = node_load($nid); switch ($type) { case 'docbook': $xml = "<?xml version='1.0'?>\n"; |