function flag_flag::_flag in Flag 6.2
Same name and namespace in other branches
- 5 flag.inc \flag_flag::_flag()
- 6 flag.inc \flag_flag::_flag()
- 7.2 flag.inc \flag_flag::_flag()
A low-level method to flag content.
You probably shouldn't call this raw private method: call the flag() function instead.
@private
Return value
The 'fcid' column of the new {flag_content} record.
1 call to flag_flag::_flag()
- flag_flag::flag in ./
flag.inc - Flags, or unflags, an item.
File
- ./
flag.inc, line 764 - 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 _flag($content_id, $uid, $sid) {
db_query("INSERT INTO {flag_content} (fid, content_type, content_id, uid, sid, timestamp) VALUES (%d, '%s', %d, %d, %d, %d)", $this->fid, $this->content_type, $content_id, $uid, $sid, time());
$fcid = db_last_insert_id('flag_content', 'fcid');
$this
->_increase_count($content_id);
return $fcid;
}