You are here

function fivestar_comment_update in Fivestar 6

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

Code

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