You are here

function apachesolr_delete_index_confirm_submit in Apache Solr Search 6.2

Same name and namespace in other branches
  1. 5.2 apachesolr.admin.inc \apachesolr_delete_index_confirm_submit()
  2. 6 apachesolr.admin.inc \apachesolr_delete_index_confirm_submit()

Submit function for the "Delete the index" confirmation form.

See also

apachesolr_delete_index_confirm()

File

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

Code

function apachesolr_delete_index_confirm_submit($form, &$form_state) {
  $form_state['redirect'] = 'admin/settings/apachesolr/index';
  try {
    apachesolr_delete_index();
    drupal_set_message(t('The Apache Solr content index has been erased. All the content on your site is queued for indexing. You can wait for it to be indexed during cron runs, or you can manually reindex it.'), 'warning');
  } catch (Exception $e) {
    watchdog('Apache Solr', nl2br(check_plain($e
      ->getMessage())), NULL, WATCHDOG_ERROR);
  }
}