summaryrefslogtreecommitdiff
path: root/modules/comment/comment.module
diff options
context:
space:
mode:
authorSteven Wittens <steven@10.no-reply.drupal.org>2005-03-03 20:51:27 +0000
committerSteven Wittens <steven@10.no-reply.drupal.org>2005-03-03 20:51:27 +0000
commit198ec98f756673da8c899bb0236a91808ed010ec (patch)
treee4527ed4574134a16683a9c6c665480e81f86e8e /modules/comment/comment.module
parent96211c616e6a71e208134272cb5266bac5edd31f (diff)
downloadbrdo-198ec98f756673da8c899bb0236a91808ed010ec.tar.gz
brdo-198ec98f756673da8c899bb0236a91808ed010ec.tar.bz2
#18329: Unify confirmation messages (and make them themable)
Diffstat (limited to 'modules/comment/comment.module')
-rw-r--r--modules/comment/comment.module14
1 files changed, 9 insertions, 5 deletions
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 7c8098b7c..2735c0ab5 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -951,7 +951,7 @@ function comment_delete($cid) {
// We'll only delete if the user has confirmed the
// deletion using the form in our else clause below.
- if ($comment->cid && $_POST['op'] == t('Delete')) {
+ if ($comment->cid && $_POST['edit']['confirm']) {
drupal_set_message(t('The comment and all its replies have been deleted.'));
// Delete comment and its replies.
@@ -966,11 +966,15 @@ function comment_delete($cid) {
}
else if ($comment->cid) {
- drupal_set_message(t('Do you want to delete this comment and all its replies?'));
+ $output = theme('confirm',
+ t('Are you sure you want to delete the comment %title?', array('%title' => '<em>'. $comment->subject .'</em>')),
+ 'node/'. $comment->nid,
+ t('Any replies to this comment will be lost. This action cannot be undone.'),
+ t('Delete'));
+ // Show comment that is being deleted
$comment->comment = check_output($comment->comment, $comment->format);
- $output = theme('comment', $comment);
- $output .= form_submit(t('Delete'));
- $output = form($output);
+ $output .= theme('comment', $comment);
+
}
else {
drupal_set_message(t('The comment no longer exists.'));