You are here

function search_api_solr_update_8001 in Search API Solr 8

Same name and namespace in other branches
  1. 8.3 search_api_solr.install \search_api_solr_update_8001()
  2. 8.2 search_api_solr.install \search_api_solr_update_8001()
  3. 4.x search_api_solr.install \search_api_solr_update_8001()

Split Solr paths stored in configurations into server and core parts.

File

./search_api_solr.install, line 175

Code

function search_api_solr_update_8001() {
  foreach (search_api_solr_update_helper_get_backend_configs() as $server_name => $backend_config) {
    $parts = explode('/', $backend_config['path']);
    if (count($parts) > 2) {
      $backend_config['core'] = array_pop($parts);
      $backend_config['path'] = implode('/', $parts);
      search_api_solr_update_helper_save_backend_config($server_name, $backend_config);
    }
  }
}