function apachesolr_enabled_facets_form_submit in Apache Solr Search 6
Same name and namespace in other branches
- 5.2 apachesolr.admin.inc \apachesolr_enabled_facets_form_submit()
- 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 257 - Administrative pages for the Apache Solr framework.
Code
function apachesolr_enabled_facets_form_submit($form, &$form_state) {
$enabled = array();
foreach ($form_state['values']['apachesolr_enabled_facets'] as $module => $facets) {
$enabled[$module] = array_filter($facets);
}
apachesolr_save_enabled_facets($enabled);
// This cache being stale can prevent new facet filters from working.
apachesolr_clear_cache();
drupal_set_message($form_state['values']['submit_message'], 'warning');
}