From 254256de82b3034aabaf3b892b23480ce348d9d5 Mon Sep 17 00:00:00 2001
From: Dries Buytaert <dries@buytaert.net>
Date: Tue, 3 Aug 2004 17:36:46 +0000
Subject: [PATCH] - Partial patch #9643 by Bart:    + the confirmation before
 deleting a comment was missing a check_output.    + after editing a comment,
 two pages were shown (two calls to theme('page',..)), replaced this by a
 drupal_goto.

---
 modules/comment.module         | 5 ++---
 modules/comment/comment.module | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/modules/comment.module b/modules/comment.module
index 543047adcde2..c740eea78de7 100644
--- a/modules/comment.module
+++ b/modules/comment.module
@@ -941,9 +941,7 @@ function comment_admin_edit($cid) {
   if ($_POST['op'] == t('Submit')) {
     $edit = $_POST['edit'];
     $output  = comment_save($edit['cid'], $edit);
-    $output .= comment_admin_overview();
-    print theme('page', $output);
-    return;
+    drupal_goto('admin/comment');
   }
 
   // if we're not saving our changes above, we're editing it.
@@ -988,6 +986,7 @@ function comment_delete($cid) {
   // Print a confirmation.
   else if ($comment->cid) {
     drupal_set_message(t('do you want to delete this comment and all its replies?'));
+    $comment->comment = check_output($comment->comment);
     $output  = theme('comment', $comment);
     $output .= form_submit(t('Delete comment'));
   }
diff --git a/modules/comment/comment.module b/modules/comment/comment.module
index 543047adcde2..c740eea78de7 100644
--- a/modules/comment/comment.module
+++ b/modules/comment/comment.module
@@ -941,9 +941,7 @@ function comment_admin_edit($cid) {
   if ($_POST['op'] == t('Submit')) {
     $edit = $_POST['edit'];
     $output  = comment_save($edit['cid'], $edit);
-    $output .= comment_admin_overview();
-    print theme('page', $output);
-    return;
+    drupal_goto('admin/comment');
   }
 
   // if we're not saving our changes above, we're editing it.
@@ -988,6 +986,7 @@ function comment_delete($cid) {
   // Print a confirmation.
   else if ($comment->cid) {
     drupal_set_message(t('do you want to delete this comment and all its replies?'));
+    $comment->comment = check_output($comment->comment);
     $output  = theme('comment', $comment);
     $output .= form_submit(t('Delete comment'));
   }
-- 
GitLab