function chado_project_update

2.x tripal_project.chado_node.inc chado_project_update($node)
3.x tripal_project.chado_node.inc chado_project_update($node)
1.x tripal_project.module chado_project_update($node)

Implements hook_update().

Parameters

$node: The node which is to have its containing information updated when the user modifies information pertaining to the specific project

Related topics

File

tripal_project/tripal_project.module, line 376
This file contains the basic functions needed for this drupal module. The drupal tripal_project module maps directly to the chado general module.

Code

function chado_project_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.
  }

  // update the project and the description
  $project_id = chado_get_id_for_node('project', $node);
  $match = array(
    'project_id' => $project_id,
  );
  $values = array(
    'name' => $node->title,
    'description' => '',
  );
  $status = tripal_core_chado_update('project', $match, $values);
  tripal_project_update_property($project_id, 'project_description', $node->project_description, 1);


}