You are here

function activity_comments_comment_delete in Activity 7

Same name and namespace in other branches
  1. 6.2 activity_comments/activity_comments.module \activity_comments_comment_delete()

Delete comment form build

1 string reference to 'activity_comments_comment_delete'
activity_comments_menu in activity_comments/activity_comments.module
Implements hook_menu().

File

activity_comments/activity_comments.module, line 63
Provides comment handling for activity messages

Code

function activity_comments_comment_delete($form, $form_state, $cid) {
  $form['#cid'] = $cid;
  $text = db_query("SELECT comment FROM {activity_comments} WHERE cid = :cid", array(
    ':cid' => $cid,
  ))
    ->fetchField();
  $comment_text = truncate_utf8(check_plain($text), 30, TRUE, TRUE);
  return confirm_form($form, t('Would you like to delete this comment: !comment', array(
    '!comment' => $comment_text,
  )), $_GET['destination']);
}