You are here

function _flag_lists_flag in Flag Lists 6

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

A low-level method to flag content.

You probably shouldn't call this raw private method: call the flag_lists_do_flag() function instead.

1 call to _flag_lists_flag()
flag_lists_do_flag in ./flag_lists.module
Flags, or unflags, an item.

File

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

Code

function _flag_lists_flag($flag, $content_id, $uid, $sid) {
  db_query("INSERT INTO {flag_lists_content} (fid, content_type, content_id, uid, sid, timestamp) VALUES (%d, '%s', %d, %d, %d, %d)", $flag->fid, $flag->content_type, $content_id, $uid, $sid, time());
  $fcid = db_last_insert_id('flag_lists_content', 'fcid');
  _flag_lists_update_count($flag, $content_id);
  return $fcid;
}