You are here

function _variable_realm_form_submit_redirect in Variable 7.2

Redirect to current page after form submission, using query string parameters.

3 calls to _variable_realm_form_submit_redirect()
variable_realm_edit_variables_form_submit in variable_realm/variable_realm.form.inc
Edit variables for realm.
variable_realm_variable_settings_form_submit in variable_realm/variable_realm.form.inc
Save realm variables and remove them from form.
variable_realm_variable_theme_form_submit in variable_realm/variable_realm.form.inc
Process system_theme_settings form submissions.

File

variable_realm/variable_realm.form.inc, line 374
Administrative forms for variable realms.

Code

function _variable_realm_form_submit_redirect($form, &$form_state) {
  if ($query_params = variable_realm_params()) {
    foreach ($query_params as $realm => $value) {
      $query[VARIABLE_REALM_QUERY_STRING . $realm] = $value;
    }

    // Parameters to be passed to drupal_goto().
    $form_state['redirect'] = array(
      current_path(),
      array(
        'query' => $query,
      ),
    );
  }
}