function tripal_cv_cvtermpath_form_submit

2.x tripal_cv.cvtermpath_form.inc tripal_cv_cvtermpath_form_submit($form, &$form_state)
3.x tripal_chado.cv.inc tripal_cv_cvtermpath_form_submit($form, &$form_state)
1.x tripal_cv_admin.inc tripal_cv_cvtermpath_form_submit($form, &$form_state)

Cvterm path form submit

File

tripal_chado/includes/tripal_chado.cv.inc, line 799

Code

function tripal_cv_cvtermpath_form_submit($form, &$form_state) {
  global $user;

  $cvid = $form_state['values']['cvid'];

  // first get the controlled vocabulary name:
  $sql = "SELECT * FROM {cv} WHERE cv_id = :cv_id";
  $cv = chado_query($sql, array(':cv_id' => $cvid))->fetchObject();

  // Submit a job to update cvtermpath
  $job_args = array($cvid);
  if ($form_state['values']['op'] == t('Update cvtermpath')) {
    tripal_add_job("Update cvtermpath: $cv->name", 'tripal_cv', 
    'chado_update_cvtermpath', $job_args, $user->uid, 10);
  }
}