function deploy_server_form_submit in Deploy - Content Staging 5
Same name and namespace in other branches
- 6 deploy.servers.admin.inc \deploy_server_form_submit()
add deployment server form submit function
File
- ./
deploy.module, line 353
Code
function deploy_server_form_submit($form_id, $form_values) {
$url = $form_values['url'];
$description = $form_values['description'];
$api_key = $form_values['api_key'];
if (array_key_exists('sid', $form_values)) {
$sid = $form_values['sid'];
db_query("update {deploy_servers} set description = '%s', url = '%s', api_key = '%s' where sid = %d", $description, $url, $api_key, $sid);
drupal_set_message(t('Deployment server updated'));
}
else {
$sid = db_next_id('{deploy_servers}_sid');
db_query("insert into {deploy_servers} (sid, description, url, api_key) values (%d, '%s', '%s', '%s')", $sid, $description, $url, $api_key);
drupal_set_message(t('Deployment server added'));
}
return 'admin/build/deploy/servers';
}