summaryrefslogtreecommitdiff
path: root/modules/book.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2005-10-06 09:17:17 +0000
committerDries Buytaert <dries@buytaert.net>2005-10-06 09:17:17 +0000
commit7b5b460534e5c54b07d28467c2aa2fc670c714e4 (patch)
tree0f7eedbfd4bbf7b35aff107d4be17d40b4cd8bb1 /modules/book.module
parenteafcfa1564746326207b523a65af9b5c984570ca (diff)
downloadbrdo-7b5b460534e5c54b07d28467c2aa2fc670c714e4.tar.gz
brdo-7b5b460534e5c54b07d28467c2aa2fc670c714e4.tar.bz2
Improved error-handling of book module.
Diffstat (limited to 'modules/book.module')
-rw-r--r--modules/book.module6
1 files changed, 3 insertions, 3 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";