Commit 7b5b4605 authored by Dries's avatar Dries
Browse files

Improved error-handling of book module.

parent eafcfa15
......@@ -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";
......
......@@ -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";
......
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