function activity_comments_comment_delete in Activity 6.2
Same name and namespace in other branches
- 7 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 - Implementation of hook_menu().
File
- activity_comments/
activity_comments.module, line 62 - Provides comment handling for activity messages
Code
function activity_comments_comment_delete($form_state, $cid) {
$form['#cid'] = $cid;
$text = db_result(db_query("SELECT comment FROM {activity_comments} WHERE cid = %d", $cid));
$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,
)), $_REQUEST['destination']);
}