You are here

function dialog_comment_delete in Dialog 7

Same name and namespace in other branches
  1. 6 modules/dialog_comment/dialog_comment.module \dialog_comment_delete()

Menu callback; Delete a comment.

1 string reference to 'dialog_comment_delete'
dialog_comment_menu in modules/dialog_comment/dialog_comment.module
Implementation of hook_menu().

File

modules/dialog_comment/dialog_comment.module, line 38

Code

function dialog_comment_delete($comment, $ajax = FALSE) {
  module_load_include('inc', 'comment', 'comment.admin');
  if (!$ajax) {
    return drupal_get_form('comment_confirm_delete', $comment);
  }
  $content = drupal_get_form('comment_confirm_delete', $comment);
  $output[] = dialog_command_display($content, array(
    'title' => t('Are you sure you want to delete the comment %title?', array(
      '%title' => $comment->subject,
    )),
    'width' => '350px',
    'height' => '200px',
  ));
  ajax_render($output);
}