function tripal_feature_sync_form_submit
1.x tripal_feature.sync_features.inc | tripal_feature_sync_form_submit($form, &$form_state) |
File
- tripal_feature/
includes/ tripal_feature.sync_features.inc, line 98 - @todo Add file header description
Code
function tripal_feature_sync_form_submit($form, &$form_state) {
global $user;
$organism_id = $form_state['values']['organism_id'];
$feature_types = $form_state['values']['feature_types'];
$job_args = array(0, $organism_id, $feature_types);
if ($organism_id) {
$organism = tripal_core_chado_select('organism', array('genus', 'species'), array('organism_id' => $organism_id));
$title = "Sync all features for " . $organism[0]->genus . " " . $organism[0]->species;
}
else {
$title = t('Sync all features for all synced organisms');
}
variable_set('chado_sync_feature_types', $feature_types);
tripal_add_job($title, 'tripal_feature', 'tripal_feature_sync_features', $job_args, $user->uid);
}