function fivestar_comment_update in Fivestar 5
Same name and namespace in other branches
- 6.2 fivestar_comment.module \fivestar_comment_update()
- 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 162
Code
function fivestar_comment_update($cid, $nid, $uid, $value) {
$vote = _fivestar_cast_vote('node', $nid, $value, 'vote', $uid);
votingapi_recalculate_results('node', $nid);
db_query('UPDATE {fivestar_comment} SET value = %d, vote_id = %d WHERE cid = %d', $value, $vote->vote_id, $cid);
}