You are here

function search_admin_settings_validate in Drupal 5

Same name and namespace in other branches
  1. 6 modules/search/search.admin.inc \search_admin_settings_validate()
  2. 7 modules/search/search.admin.inc \search_admin_settings_validate()

Validate callback.

File

modules/search/search.module, line 186
Enables site-wide keyword searching.

Code

function search_admin_settings_validate($form_id, $form_values) {
  if ($form_values['op'] == t('Re-index site')) {
    drupal_goto('admin/settings/search/wipe');
  }

  // If these settings change, the index needs to be rebuilt.
  if (variable_get('minimum_word_size', 3) != $form_values['minimum_word_size'] || variable_get('overlap_cjk', TRUE) != $form_values['overlap_cjk']) {
    drupal_set_message(t('The index will be rebuilt.'));
    search_wipe();
  }
}