You are here

function deploy_plan_push_form_submit in Deploy - Content Staging 6

Submit callback for deploy_plan_push_form()

This is where the actual action takes place.

@todo Check system config on remote host - installed modules, proper versions, etc. @todo Better error message handling that is not dependent on xmlrpc_error.

File

./deploy.module, line 361
Deployment API which enables modules to deploy items between servers.

Code

function deploy_plan_push_form_submit($form, &$form_state) {

  // Setup some data
  global $user;
  $pid = $form_state['values']['pid'];
  $sid = $form_state['values']['sid'];

  // If a session is successfully created, then go on to the deploy_check
  // batch process. Otherwise quit out and show the error log.
  if (deploy_plan_init($pid, $sid, $form_state['values'])) {
    $form_state['redirect'] = "admin/build/deploy/deploy_check_batch";
  }
  else {
    $dlid = variable_get('deploy_log_id', '');
    deploy_plan_cleanup();
    $form_state['redirect'] = "admin/build/deploy/logs/details/{$dlid}";
  }
}