function apachesolr_multilingual_environment_edit_form_submit in Apache Solr Multilingual 6.3
Same name and namespace in other branches
- 7 apachesolr_multilingual.module \apachesolr_multilingual_environment_edit_form_submit()
1 string reference to 'apachesolr_multilingual_environment_edit_form_submit'
File
- ./
apachesolr_multilingual.module, line 833 - Multilingual search using Apache Solr.
Code
function apachesolr_multilingual_environment_edit_form_submit($form, &$form_state) {
$environment = apachesolr_multilingual_environment_load($form['env_id']['#value']);
$reindex = FALSE;
if ($form_state['values']['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_map_language_neutral'] != $environment['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_map_language_neutral']) {
$reindex = TRUE;
}
if ($form_state['values']['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_translations'] != $environment['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_translations']) {
$reindex = TRUE;
}
if ($form_state['values']['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_unpublished_translations'] != $environment['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_unpublished_translations']) {
$reindex = TRUE;
}
if ($form_state['values']['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_term_translations'] != $environment['conf']['apachesolr_multilingual_index_settings']['apachesolr_multilingual_clir']['apachesolr_multilingual_index_term_translations']) {
$reindex = TRUE;
}
if ($reindex) {
drupal_set_message(t('The changes requires you to !link_reindex your content.', array(
'!link_reindex' => l(t('re-index'), 'admin/settings/apachesolr/settings/' . $form['env_id']['#default_value'] . '/index'),
)), 'warning');
}
}