You are here

function apachesolr_delete_index_form_submit in Apache Solr Search 5.2

Same name and namespace in other branches
  1. 5 apachesolr.module \apachesolr_delete_index_form_submit()

Submit handler for apachesolr_delete_index_form()

See also

apachesolr_delete_index_form()

File

./apachesolr.admin.inc, line 377
Administrative pages for the Apache Solr framework.

Code

function apachesolr_delete_index_form_submit($form_id, $form_values) {
  if ($form_values['op'] == t('Delete the index')) {
    return 'admin/settings/apachesolr/index/delete/confirm';
  }
  elseif ($form_values['op'] == t('Re-index all content')) {
    return 'admin/settings/apachesolr/index/clear/confirm';
  }
  elseif (in_array($form_values['op'], array(
    t('Start indexer'),
    t('Pause indexer'),
  ))) {
    variable_set('apachesolr_read_only', $form_values['op'] == t('Start indexer') ? APACHESOLR_READ_WRITE : APACHESOLR_READ_ONLY);
  }
}