| 1 |
<?php |
<?php |
| 2 |
// $Id: $ |
// $Id: export_dxml.module,v 1.3 2005-11-29 19:28:10 puregin Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 86 |
*/ |
*/ |
| 87 |
function book_node_visitor_dxml_pre($node, $depth, $nid) { |
function book_node_visitor_dxml_pre($node, $depth, $nid) { |
| 88 |
|
|
|
// Allow modules to change $node->body before viewing. |
|
|
node_invoke_nodeapi($node, 'export_xml', $node->body, false); |
|
|
|
|
| 89 |
$title = "<title>". check_plain($node->title) ."</title>\n"; |
$title = "<title>". check_plain($node->title) ."</title>\n"; |
| 90 |
|
|
| 91 |
$allow_php = variable_get('Allow PHP Export', false); |
$allow_php = variable_get('Allow PHP Export', false); |
| 92 |
if (!$allow_php) { |
$filter_formats = filter_formats(); /* get the array of formats */ |
| 93 |
|
if (($filter_formats[$node->format]->name == 'PHP code') && (!$allow_php) ) { |
| 94 |
|
// convert PHP on the fly if PHP export is not allowed |
| 95 |
$node = node_invoke($node, 'content'); |
$node = node_invoke($node, 'content'); |
| 96 |
} |
} |
| 97 |
|
|
| 120 |
|
|
| 121 |
// now store metadata |
// now store metadata |
| 122 |
$output .= "<nodeinfo "; |
$output .= "<nodeinfo "; |
|
$output .= " md5_body='" . md5($node->body) . "'"; |
|
|
$output .= " weight='$node->weight'"; |
|
|
$output .= " depth='$depth'"; |
|
| 123 |
$output .= " type='$node->type'"; |
$output .= " type='$node->type'"; |
|
$output .= " author='"._get_username($node->uid)."'"; |
|
| 124 |
$output .= " uid='$node->uid'"; |
$output .= " uid='$node->uid'"; |
|
$output .= " created='$node->created'"; |
|
| 125 |
$output .= " status='$node->status'"; |
$output .= " status='$node->status'"; |
| 126 |
$output .= " format='$node->format'"; |
$output .= " created='$node->created'"; |
|
$output .= " sticky='$node->sticky'"; |
|
| 127 |
$output .= " promote='$node->promote'"; |
$output .= " promote='$node->promote'"; |
| 128 |
|
$output .= " moderate='$node->moderate'"; |
| 129 |
|
$output .= " changed='$node->changed'"; |
| 130 |
|
$output .= " sticky='$node->sticky'"; |
| 131 |
|
$output .= " vid='$node->vid'"; |
| 132 |
|
|
| 133 |
|
$output .= " format='$node->format'"; |
| 134 |
|
|
| 135 |
|
$output .= " md5_body='" . md5($node->body) . "'"; |
| 136 |
|
$output .= " weight='$node->weight'"; |
| 137 |
|
$output .= " depth='$depth'"; |
| 138 |
|
$output .= " author='"._get_username($node->uid)."'"; |
| 139 |
$output .= "/>\n"; |
$output .= "/>\n"; |
| 140 |
|
|
| 141 |
$output .= $title; |
$output .= $title; |