You are here

function search_files_helper_confirm_delete_form in Search Files 6.2

Same name and namespace in other branches
  1. 5 search_files.module \search_files_helper_confirm_delete_form()
  2. 7.2 search_files.module \search_files_helper_confirm_delete_form()

generate the deletion confirmation form for helper apps and return the form

Parameters

unknown_type $form_state:

(int) $helper_id:

Return value

(array) $form

1 string reference to 'search_files_helper_confirm_delete_form'
search_files_helper_confirm_delete in ./search_files.module
check to make sure the $helper_id is valid (a number greater than zero) then it fetches the deletion confirmation form, then returns it

File

./search_files.module, line 237
Used to index files in attachments and directories

Code

function search_files_helper_confirm_delete_form(&$form_state, $helper_id) {
  $helper_name = db_result(db_query("SELECT name FROM {search_files_helpers} WHERE id = %d", $helper_id));
  $form = array();
  $form['search_files_helper_id'] = array(
    '#type' => 'hidden',
    '#value' => $helper_id,
  );
  $form['search_files_helper_name'] = array(
    '#type' => 'hidden',
    '#value' => $helper_name,
  );
  return confirm_form($form, t('Are you sure you want to delete the %name helper? The text extracted by this helper will remain in the search index until the directory is reindexed.', array(
    '%name' => $helper_name,
  )), 'admin/settings/search_files/helpers/list', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}