You are here

function flag_flag::delete in Flag 6.2

Same name and namespace in other branches
  1. 5 flag.inc \flag_flag::delete()
  2. 6 flag.inc \flag_flag::delete()
  3. 7.3 includes/flag/flag_flag.inc \flag_flag::delete()
  4. 7.2 flag.inc \flag_flag::delete()

Deletes a flag from the database.

File

./flag.inc, line 1096
Implements various flags. Uses object oriented style inspired by that of Views 2.

Class

flag_flag
This abstract class represents a flag, or, in Views 2 terminology, "a handler".

Code

function delete() {
  db_query('DELETE FROM {flags} WHERE fid = %d', $this->fid);
  db_query('DELETE FROM {flag_content} WHERE fid = %d', $this->fid);
  db_query('DELETE FROM {flag_types} WHERE fid = %d', $this->fid);
  db_query('DELETE FROM {flag_counts} WHERE fid = %d', $this->fid);
  module_invoke_all('flag_delete', $this);
}