$is_index_type_temporary = false; $is_index_type_managed = false; $is_index_readonly = false; if ($subtab === $index_indice) { $is_index_type_temporary = $option_object->is_index_type_temporary($option_data['solr_indexes'][$index_indice]); $is_index_type_managed = $option_object->is_index_type_managed($option_data['solr_indexes'][$index_indice]); $is_index_readonly = $is_index_type_temporary; if ($is_index_type_temporary) { // Check that the temporary index is still temporary on the server. $managed_solr_server = new OptionManagedSolrServer($option_object->get_index_managed_solr_service_id($index)); $response_object = $managed_solr_server->call_rest_get_temporary_solr_index_status($index_indice); if (OptionManagedSolrServer::is_response_ok($response_object)) { $is_index_unknown_on_server = OptionManagedSolrServer::get_response_result($response_object, 'isUnknown'); if ($is_index_unknown_on_server) { // Change the solr index type to managed $option_object->update_index_property($index_indice, OptionIndexes::INDEX_TYPE, OptionIndexes::STORED_INDEX_TYPE_UNMANAGED); // Display message $response_error = 'This temporary solr core has expired and was therefore deleted. You can remove it from your configuration'; // No more readonly therefore $is_index_type_temporary = false; $is_index_readonly = false; } else { $is_index_type_temporary_on_server = OptionManagedSolrServer::get_response_result($response_object, 'isTemporary'); if (!$is_index_type_temporary_on_server) { // Change the solr index type to managed $option_object->update_index_property($index_indice, OptionIndexes::INDEX_TYPE, OptionIndexes::STORED_INDEX_TYPE_MANAGED); // No more readonly therefore $is_index_type_temporary = false; $is_index_readonly = false; } }