You are here

function apachesolr_search_mlt_delete_block_form 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()
  2. 7 apachesolr_search.admin.inc \apachesolr_search_mlt_delete_block_form()
1 string reference to 'apachesolr_search_mlt_delete_block_form'
apachesolr_search_menu in ./apachesolr_search.module
Implements hook_menu().

File

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

Code

function apachesolr_search_mlt_delete_block_form(&$form_state, $block) {
  $form = array();
  if ($block) {

    // Backwards compatibility for the block deltas
    if (isset($block['delta'])) {
      $delta = $block['delta'];
    }
    else {
      $delta = arg(6);
    }

    // Add our delta to the delete form
    $form['delta'] = array(
      '#type' => 'value',
      '#value' => $delta,
    );
    $question = t('Are you sure you want to delete the "More Like this" block %name?', array(
      '%name' => $block['name'],
    ));
    $path = 'admin/build/block';
    $description = t('The block will be deleted. This action cannot be undone.');
    $yes = t('Delete');
    $no = t('Cancel');
    return confirm_form($form, filter_xss($question), $path, $description, $yes, $no);
  }
}