function fivestar_comment_delete in Fivestar 5
Same name and namespace in other branches
- 6.2 fivestar_comment.module \fivestar_comment_delete()
- 6 fivestar_comment.module \fivestar_comment_delete()
Delete any value for a comment and update their vote.
1 call to fivestar_comment_delete()
- fivestar_comment in ./
fivestar_comment.module - Implementation of hook_comment().
File
- ./
fivestar_comment.module, line 180
Code
function fivestar_comment_delete($cid, $nid, $vote_id) {
db_query('DELETE FROM {fivestar_comment} WHERE cid = %d', $cid);
$vote = new stdClass();
$vote->content_id = $nid;
$vote->content_type = 'node';
$vote->vote_id = $vote_id;
votingapi_delete_vote($vote);
votingapi_recalculate_results('node', $nid);
}