You are here

function fivestar_comment_insert in Fivestar 6

Same name and namespace in other branches
  1. 5 fivestar_comment.module \fivestar_comment_insert()
  2. 6.2 fivestar_comment.module \fivestar_comment_insert()

Insert a fivestar comment value.

1 call to fivestar_comment_insert()
fivestar_comment in ./fivestar_comment.module
Implementation of hook_comment().

File

./fivestar_comment.module, line 182

Code

function fivestar_comment_insert($cid, $nid, $uid, $value) {
  $vote = _fivestar_cast_vote('node', $nid, $value, 'vote', $uid);
  db_query('INSERT INTO {fivestar_comment} (cid, vote_id, value) VALUES (%d, %d, %d)', $cid, $vote['vote_id'], $value);
}