function finder_delete in Finder 7
Same name and namespace in other branches
- 6 finder.module \finder_delete()
- 7.2 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 - Implements hook_finderapi().
File
- ./
finder.module, line 469 - The finder module.
Code
function finder_delete($finder_id) {
$finder = finder_load($finder_id);
db_delete('finder_element')
->condition('finder_id', $finder_id)
->execute();
db_delete('finder')
->condition('finder_id', $finder_id)
->execute();
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,
)));
}