You are here

function export_node_import in Node export 5

Same name and namespace in other branches
  1. 5.2 export.pages.inc \export_node_import()
  2. 6 export.pages.inc \export_node_import()

Import Node UI

1 string reference to 'export_node_import'
export_menu in ./export.module
Implementation of hook_menu().

File

./export.module, line 199

Code

function export_node_import() {
  global $user;
  $output;
  if ($_POST['import_code']) {
    $node_code = str_replace('node(code(', 'array(array(', $_POST['import_code']);
    $imp = eval("return " . $node_code . ";");
    return str_replace('admin/content/import', 'node/add/' . $imp[0]['type'] . '', drupal_get_form($imp[0]['type'] . '_node_form', $imp[0]));
  }
  else {
    return drupal_get_form('export_import_form', $form);
  }
}