function export_node_import in Node export 6
Same name and namespace in other branches
- 5.2 export.pages.inc \export_node_import()
- 5 export.module \export_node_import()
Import Node UI
1 string reference to 'export_node_import'
- export_menu in ./
export.module - Implementation of hook_menu().
File
- ./
export.pages.inc, line 111
Code
function export_node_import() {
global $user;
$output;
if ($_POST['import_code']) {
$node_code = trim($_POST['import_code']);
$import = export_node_decode($node_code);
if (is_array($import)) {
foreach ($import as $new_node) {
$new_nid = export_node_save($new_node);
drupal_set_message(t("Imported !node", array(
'!node' => l($new_node->title, 'node/' . $new_nid),
)));
}
drupal_goto('admin/content/node');
}
else {
return export_node_check($import);
}
}
else {
return drupal_get_form('export_import_form', $form);
}
}