You are here

function fivestar_comment_insert in Fivestar 6.2

Same name and namespace in other branches
  1. 5 fivestar_comment.module \fivestar_comment_insert()
  2. 6 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 224

Code

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