You are here

function flag_lists_title_exists in Flag Lists 6

Same name and namespace in other branches
  1. 7.3 flag_lists.module \flag_lists_title_exists()
  2. 7 flag_lists.module \flag_lists_title_exists()

Checks for a list title by node type.

1 call to flag_lists_title_exists()
flag_lists_form_validate in ./flag_lists.admin.inc
Validate a list.

File

./flag_lists.module, line 1106
The Flag Lists module.

Code

function flag_lists_title_exists($title, $type) {
  global $user;
  return db_result(db_query("SELECT COUNT(*) FROM {flag_lists_flags} fl LEFT JOIN {flag_types} ft ON fl.pfid = ft.fid WHERE fl.title = '%s' AND ft.type = '%s' AND fl.uid = %d", $title, $type, $user->uid));
}