You are here

function _flag_lists_flag in Flag Lists 7

Same name and namespace in other branches
  1. 6 flag_lists.module \_flag_lists_flag()
  2. 7.3 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 1507
The Flag Lists module.

Code

function _flag_lists_flag($flag, $content_id, $uid, $sid) {
  $fcid = db_insert('flag_lists_content')
    ->fields(array(
    'fid' => $flag->fid,
    'content_type' => $flag->content_type,
    'content_id' => $content_id,
    'uid' => $uid,
    'sid' => $sid,
    'timestamp' => REQUEST_TIME,
  ))
    ->execute();
  _flag_lists_update_count($flag, $content_id);
  return $fcid;
}