You are here

function fivestar_comment_update in Fivestar 6.2

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

Update a fivestar comment value.

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

File

./fivestar_comment.module, line 216

Code

function fivestar_comment_update($cid, $nid, $uid, $value, $tag = 'vote') {
  $vote = _fivestar_cast_vote('node', $nid, $value, $tag, $uid);
  db_query("UPDATE {fivestar_comment} SET value = %d, vote_id = %d WHERE cid = %d AND tag = '%s'", $value, $vote['user']['vote_id'], $cid, $tag);
}