You are here

function customfilter_filter_delete in Custom filter 6

Same name and namespace in other branches
  1. 5 customfilter.module \customfilter_filter_delete()
  2. 7.2 customfilter.module \customfilter_filter_delete()
  3. 7 customfilter.module \customfilter_filter_delete()

Return the filter delete form.

1 string reference to 'customfilter_filter_delete'
customfilter_menu in ./customfilter.module
Implements hook_menu().

File

./customfilter.admin.inc, line 166
Administration page callbacks for Custom filter.

Code

function customfilter_filter_delete($form_state, $fid) {
  $filters = _customfilter_get_filters();
  $form = array();
  if (!$fid || !isset($filters[$fid])) {
    drupal_set_message(t('The filter data have not been found.'), 'error');
    watchdog('customfilter', 'The filter data have not been found, or customfilter_filter_delete() received a wrong parameter.', NULL, WATCHDOG_ERROR);
    return $form;
  }
  $form['#fid'] = $fid;
  return confirm_form($form, t('Are you sure you want to delete %id?', array(
    '%id' => $filters[$fid]['id'],
  )), 'admin/settings/customfilter', NULL, t('Delete'));
}