function flag_lists_fl_delete in Flag Lists 6
Same name and namespace in other branches
- 7.3 flag_lists.module \flag_lists_fl_delete()
- 7 flag_lists.module \flag_lists_fl_delete()
Delete a flag_lists flag.
2 calls to flag_lists_fl_delete()
- flag_lists_delete_confirm_submit in ./
flag_lists.admin.inc - flag_lists_generate_lists_form_submit in ./
flag_lists.admin.inc - Submit handler for flag_lists_generate_lists_form.
File
- ./
flag_lists.module, line 864 - The Flag Lists module.
Code
function flag_lists_fl_delete($flag, $account = NULL) {
if (!isset($account)) {
$account = $GLOBALS['user'];
}
db_query("DELETE FROM {flag_lists_counts} WHERE fid = %d", $flag->fid);
db_query("DELETE FROM {flag_lists_content} WHERE fid = %d", $flag->fid);
db_query("DELETE FROM {flag_lists_flags} WHERE fid = %d", $flag->fid);
$flag->is_deleted = TRUE;
module_invoke_all('flag_lists', $flag, $account);
_flag_lists_clear_cache();
drupal_set_message(t('The @name @title has been deleted.', array(
'@name' => variable_get('flag_lists_name', t('list')),
'@title' => $flag->title,
)));
}