You are here

function finder_element_delete in Finder 6

Same name and namespace in other branches
  1. 7 finder.module \finder_element_delete()

Delete a finder element.

Parameters

$finder_element_id: The finder element ID.

1 call to finder_element_delete()
finder_admin_element_delete_submit in includes/finder.admin.inc
Submit function for admin finder delete page.
1 string reference to 'finder_element_delete'
finder_i18nstrings_finderapi in modules/finder_i18nstrings/finder_i18nstrings.module
Implementation of hook_finderapi().

File

./finder.module, line 526
The finder module.

Code

function finder_element_delete($finder_element_id) {
  $finder_element = finder_element_load($finder_element_id);
  db_query("DELETE FROM {finder_element} WHERE finder_element_id = %d", $finder_element_id);
  finder_invoke_finderapi($finder_element, 'finder_element_delete');
  watchdog('finder', 'Finder element %title deleted.', array(
    '%title' => $finder_element->title,
  ));
  drupal_set_message(t('Finder element %title has been deleted.', array(
    '%title' => $finder_element->title,
  )));
}