You are here

function apachesolr_search_update_7006 in Apache Solr Search 7

Same name and namespace in other branches
  1. 8 apachesolr_search.install \apachesolr_search_update_7006()

Remove all apachesolr_search env variables for show_facets if it is zero

File

./apachesolr_search.install, line 371
Install and related hooks for apachesolr_search.

Code

function apachesolr_search_update_7006() {
  module_load_include('module', 'apachesolr');
  $environments = apachesolr_load_all_environments();
  foreach ($environments as $environment) {
    $show_facets = apachesolr_environment_variable_get($environment['env_id'], 'apachesolr_search_show_facets', 0);
    if ($show_facets === 0) {
      apachesolr_environment_variable_del($environment['env_id'], 'apachesolr_search_show_facets');
    }
  }
}