| 1 |
<?php |
<?php |
| 2 |
// $Id: node_export.module,v 1.1.2.6 2009/10/31 06:18:10 danielb Exp $ |
// $Id: node_export.module,v 1.1.2.7 2009/10/31 06:24:55 danielb Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 481 |
* @return |
* @return |
| 482 |
* FALSE is the types check failed |
* FALSE is the types check failed |
| 483 |
* Returns the HTML of a node form if required to prepopulate |
* Returns the HTML of a node form if required to prepopulate |
| 484 |
* Otherwise returns nothing, and may redirect. |
* Otherwise returns TRUE, or may redirect. |
| 485 |
*/ |
*/ |
| 486 |
function node_export_import($node_code, $method = NULL, $redirect = TRUE, $msg_func = 'drupal_set_message', $msg_t = 't') { |
function node_export_import($node_code, $method = NULL, $redirect = TRUE, $msg_func = 'drupal_set_message', $msg_t = 't') { |
| 487 |
$import = node_export_node_decode($node_code); |
$import = node_export_node_decode($node_code); |
| 508 |
if ($redirect) { |
if ($redirect) { |
| 509 |
drupal_goto('admin/content/node'); |
drupal_goto('admin/content/node'); |
| 510 |
} |
} |
| 511 |
|
return TRUE; |
| 512 |
} |
} |
| 513 |
else { |
else { |
| 514 |
// We are importing a single node. |
// We are importing a single node. |