You are here

function comment_goodness_confirm_delete in Comment goodness 7

Confirm form for deleting own comment.

We can't use the core comment_confirm_delete() because it talks about deleting replies, and also mollom hooks into that form which is not appropriate for end-users.

1 string reference to 'comment_goodness_confirm_delete'
comment_goodness_menu in ./comment_goodness.module
Implements hook_menu().

File

./comment_goodness.module, line 357
Comment goodness provides newest to oldest comment sorting

Code

function comment_goodness_confirm_delete($form, &$form_state, $comment) {
  $form['#comment'] = $comment;

  // Always provide entity id in the same form key as in the entity edit form.
  $form['cid'] = array(
    '#type' => 'value',
    '#value' => $comment->cid,
  );
  return confirm_form($form, t('Are you sure you want to delete the comment %title?', array(
    '%title' => $comment->subject,
  )), 'node/' . $comment->nid, t('This action cannot be undone.'), t('Delete'), t('Cancel'), 'comment_goodness_confirm_delete');
}