You are here

function finder_delete in Finder 6

Same name and namespace in other branches
  1. 7.2 finder.module \finder_delete()
  2. 7 finder.module \finder_delete()

Delete a finder and it's finder elements.

Parameters

$finder_id: The finder ID.

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

File

./finder.module, line 462
The finder module.

Code

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