function tripal_bulk_loader_insert

2.x tripal_bulk_loader.chado_node.inc tripal_bulk_loader_insert($node)
3.x tripal_bulk_loader.chado_node.inc tripal_bulk_loader_insert($node)
1.x tripal_bulk_loader.module tripal_bulk_loader_insert($node)

Implements node_insert Insert the data from the node form on Create content

Related topics

File

tripal_bulk_loader/tripal_bulk_loader.module, line 452
The functions for the Tripal bulk loader.

Code

function tripal_bulk_loader_insert($node) {

  // Insert into tripal_bulk_loader
  $sql = "INSERT INTO {tripal_bulk_loader} (nid, loader_name, template_id, file, file_has_header, job_status, keep_track_inserted) VALUES (%d, '%s', %d, '%s', %d, '%s', %d)";
  db_query($sql, $node->nid, $node->loader_name, $node->template_id, $node->file, $node->has_header, 'Initialized', $node->keep_track_inserted);

  // Update title
  $node->title = $node->loader_name;
  drupal_write_record('node', $node, 'nid');
  drupal_write_record('node_revision', $node, 'nid');

  drupal_set_message(t('After reviewing the details, please Submit this Job (by clicking the "Submit Job" button below). No data will be loaded until the submitted job is reached in the queue.'));

}