function apachesolr_facetcount_save in Apache Solr Search 6
Same name and namespace in other branches
- 5.2 apachesolr.module \apachesolr_facetcount_save()
- 5 apachesolr.module \apachesolr_facetcount_save()
- 6.2 apachesolr.module \apachesolr_facetcount_save()
Used by the 'save' $op of hook_block so that modules can generically set facet limits on their blocks.
2 calls to apachesolr_facetcount_save()
- apachesolr_og_block in contrib/
apachesolr_og/ apachesolr_og.module - Implementation of hook_block().
- apachesolr_search_block in ./
apachesolr_search.module - Implementation of hook_block().
File
- ./
apachesolr.module, line 1197 - Integration with the Apache Solr search application.
Code
function apachesolr_facetcount_save($edit) {
// Save query limits
$module = $edit['module'];
$delta = $edit['delta'];
$limits = variable_get('apachesolr_facet_query_limits', array());
$limits[$module][$delta] = (int) $edit['apachesolr_facet_query_limit'];
variable_set('apachesolr_facet_query_limits', $limits);
$initial = variable_get('apachesolr_facet_query_initial_limits', array());
$initial[$module][$delta] = (int) $edit['apachesolr_facet_query_initial_limit'];
variable_set('apachesolr_facet_query_initial_limits', $initial);
$children = variable_get('apachesolr_facet_show_children', array());
$children[$module][$delta] = (int) $edit['apachesolr_facet_show_children'];
variable_set('apachesolr_facet_show_children', $children);
$facet_missing = variable_get('apachesolr_facet_missing', array());
$facet_missing[$module][$delta] = (int) $edit['apachesolr_facet_missing'];
variable_set('apachesolr_facet_missing', $facet_missing);
}