function chado_library_update

2.x tripal_library.chado_node.inc chado_library_update($node)
3.x tripal_library.chado_node.inc chado_library_update($node)
1.x tripal_library.module chado_library_update($node)

Update nodes

Related topics

File

tripal_library/tripal_library.module, line 610

Code

function chado_library_update($node) {
  if ($node->revision) {
    // there is no way to handle revisions in Chado but leave
    // this here just to make not we've addressed it.
  }

  $library_id = chado_get_id_for_node('library', $node);
  // update the library record
  $match = array(
    'library_id' => $library_id,
  );
  $values = array(
    'name' => $node->title,
    'uniquename' => $node->uniquename,
    'organism_id' => $node->organism_id,
    'type_id' => $node->library_type,
  );
  $status = tripal_core_chado_update('library', $match, $values);

  tripal_library_update_property($library_id, 'library_description', $node->library_description, 1);

}