You are here

function environment_switch_confirm_submit in Environment 7

Same name and namespace in other branches
  1. 6 environment.admin.inc \environment_switch_confirm_submit()

Handler for switch environment confirmation.

File

./environment.admin.inc, line 108
Settings for Environment module.

Code

function environment_switch_confirm_submit($form, &$form_state) {
  if (isset($form['environment'])) {
    foreach ($form['environment'] as $workflow => $environment) {
      if ($form_state['values']['environment'][$workflow] != $form['environment'][$workflow]) {
        environment_switch($form_state['values']['environment'][$workflow], $workflow);
      }
    }
  }
  $form_state['redirect'] = 'admin/settings/environment';
}