You are here

function apachesolr_access_environment_edit_form_submit in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_access/apachesolr_access.module \apachesolr_access_environment_edit_form_submit()

Added button-level form submit function for apachesolr_environment_edit_form.

1 string reference to 'apachesolr_access_environment_edit_form_submit'
apachesolr_access_form_apachesolr_environment_edit_form_alter in apachesolr_access/apachesolr_access.module
Implements hook_form_FORM_ID_alter().

File

apachesolr_access/apachesolr_access.module, line 174

Code

function apachesolr_access_environment_edit_form_submit($form, &$form_state) {
  $prior = empty($form['#environment']['conf']['apachesolr_access_always_add_grants']) ? 0 : 1;
  if ($form_state['values']['conf']['apachesolr_access_always_add_grants'] != $prior) {
    apachesolr_access_enable();
  }
}