function node_deploy_operations_add_now_form_submit in Deploy - Content Staging 6
Submit handler for node_deploy_operations_add_now_form().
File
- modules/
node_deploy/ node_deploy.pages.inc, line 156 - Page handlers for node deployment pages.
Code
function node_deploy_operations_add_now_form_submit($form, &$form_state) {
$sid = $form_state['values']['sid'];
$pid = node_deploy_operations_create_plan($form_state['values']['nids']);
// Now do the deployment
if (deploy_plan_init($pid, $sid, $form_state['values'])) {
// Redirect to the log overview page for this push.
$form_state['redirect'] = "admin/build/deploy/deploy_check_batch";
}
else {
$dlid = variable_get('deploy_log_id', '');
deploy_plan_cleanup();
// Redirect to the log overview page for this push.
$form_state['redirect'] = "admin/build/deploy/logs/details/{$dlid}";
}
}