You are here

function apachesolr_enabled_facets_form_submit in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 6 apachesolr.admin.inc \apachesolr_enabled_facets_form_submit()
  2. 6.2 apachesolr.admin.inc \apachesolr_enabled_facets_form_submit()

This is the submit handler for the active facets form.

The form values for each module are array filtereed to remove non-enabled items and stored in the variable table with the name 'apachesolr_enabled_facets'.

See also

apachesolr_enabled_facets_form()

File

./apachesolr.admin.inc, line 225
Administrative pages for the Apache Solr framework.

Code

function apachesolr_enabled_facets_form_submit($form_id, $form_values) {
  $enabled = array();
  foreach ($form_values['apachesolr_enabled_facets'] as $module => $facets) {
    $enabled[$module] = array_filter($facets);
  }
  apachesolr_save_enabled_facets($enabled);
  drupal_set_message($form_values['submit_message'], 'warning');
}