You are here

function fivestar_comment_delete in Fivestar 6.2

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

Code

function fivestar_comment_delete($cid, $nid, $votes_for_deletion) {
  if (isset($votes_for_deletion)) {
    db_query('DELETE FROM {fivestar_comment} WHERE cid = %d', $cid);
    votingapi_delete_votes($votes_for_deletion);
    votingapi_recalculate_results('node', $nid);
  }
}