You are here

function heartbeat_comments_node_delete_confirm_submit in Heartbeat 6.4

Submit callback te delete a node comment.

_state

Parameters

$form:

File

modules/heartbeat_comments/heartbeat_comments.module, line 953
heartbeat_comments.module Heartbeat comments can come with two possible

Code

function heartbeat_comments_node_delete_confirm_submit($form, &$form_state) {
  db_query("DELETE FROM {comments} WHERE cid = %d", $form_state['values']['cid']);
  $form_state['redirect'] = isset($_GET['destination']) ? $_GET['destination'] : $form_state['values']['redirect_path'];

  // TODO Make uaid somehow available here.

  //if (variable_get('heartbeat_comments_cache', 1)) {

  //  cache_clear_all('heartbeat:comments:'. $uaid. ':0', 'cache');

  //}
  drupal_set_message('Comment deleted.');
}