You are here

function apachesolr_search_mlt_delete_block_form_submit in Apache Solr Search 6.3

Same name and namespace in other branches
  1. 8 apachesolr_search.admin.inc \apachesolr_search_mlt_delete_block_form_submit()
  2. 7 apachesolr_search.admin.inc \apachesolr_search_mlt_delete_block_form_submit()

File

./apachesolr_search.admin.inc, line 1097
Administrative settings for searching.

Code

function apachesolr_search_mlt_delete_block_form_submit($form, &$form_state) {
  $blocks = apachesolr_search_load_all_mlt_blocks();
  unset($blocks[$form_state['values']['delta']]);
  variable_set('apachesolr_search_mlt_blocks', $blocks);
  drupal_set_message(t('The block has been deleted.'));
  $form_state['redirect'] = 'admin/settings/apachesolr/search-pages';
}