function apachesolr_search_delete_search_page_confirm_submit in Apache Solr Search 8
Same name and namespace in other branches
- 6.3 apachesolr_search.admin.inc \apachesolr_search_delete_search_page_confirm_submit()
- 7 apachesolr_search.admin.inc \apachesolr_search_delete_search_page_confirm_submit()
Process content type delete confirm submissions.
File
- ./
apachesolr_search.admin.inc, line 579 - Administrative settings for searching.
Code
function apachesolr_search_delete_search_page_confirm_submit($form, &$form_state) {
// Deletes the index configuration settings.
// @todo Invoke a hook that allows backends and indexers to delete their stuff.
db_delete('apachesolr_search_page')
->condition('page_id', $form_state['values']['page_id'])
->execute();
// Sets message, logs action.
drupal_set_message(t('The %label search page configuration has been deleted.', array(
'%label' => $form_state['values']['label'],
)));
watchdog('apachesolr_search', 'Deleted search page configuration "@page_id".', array(
'@page_id' => $form_state['values']['page_id'],
), WATCHDOG_NOTICE);
// Rebuilds the menu cache.
menu_rebuild();
// Returns back to search page list page.
$form_state['redirect'] = 'admin/config/search/apachesolr/search-pages';
}