You are here

function apachesolr_search_update_6301 in Apache Solr Search 6.3

Remove all apachesolr_search env variables for show_facets if it is zero

File

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

Code

function apachesolr_search_update_6301() {
  $environments = apachesolr_load_all_environments(TRUE);
  if (is_array($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');
      }
    }
  }
  return array();
}