function apachesolr_update_7017 in Apache Solr Search 8
Same name and namespace in other branches
- 7 apachesolr.install \apachesolr_update_7017()
Turn global variables in environment specific ones.
File
- ./apachesolr.install, line 904 
- Install and related hooks for apachesolr_search.
Code
function apachesolr_update_7017() {
  // @see: drupal_load()
  if (!function_exists('apachesolr_environment_variable_set')) {
    include_once dirname(__FILE__) . '/apachesolr.module';
  }
  $stored = variable_get('apachesolr_index_last', array());
  foreach ($stored as $env_id => $entity_info) {
    apachesolr_environment_variable_set($env_id, 'apachesolr_index_last', $entity_info);
  }
  variable_del('apachesolr_index_last');
  $updated = variable_get('apachesolr_index_updated', array());
  $optimized = variable_get('apachesolr_last_optimize', 0);
  foreach ($updated as $env_id => $timestamp) {
    apachesolr_environment_variable_set($env_id, 'apachesolr_index_updated', $timestamp);
    apachesolr_environment_variable_set($env_id, 'apachesolr_last_optimize', $optimized);
  }
}