Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.802
diff -u -p -r1.802 comment.module
--- modules/comment/comment.module	7 Nov 2009 13:35:20 -0000	1.802
+++ modules/comment/comment.module	8 Nov 2009 06:15:30 -0000
@@ -190,9 +190,10 @@ function comment_menu() {
   );
   $items['comment/%comment/approve'] = array(
     'title' => 'Approve',
-    'page callback' => 'comment_approve',
-    'page arguments' => array(1),
-    'access arguments' => array('administer comments'),
+    'page callback' => 'drupal_get_form',
+    'page arguments' => array('comment_approve_form', 1),
+    'access callback' => 'comment_approve_access',
+    'access arguments' => array(1, 'administer comments'),
     'type' => MENU_LOCAL_TASK,
     'context' => MENU_CONTEXT_INLINE,
     'file' => 'comment.pages.inc',
@@ -222,6 +223,16 @@ function comment_menu() {
 }
 
 /**
+ * Menu access callback; Determine access for "Approve" link.
+ */
+function comment_approve_access($comment, $permission) {
+  if (!user_access($permission) || $comment->status != COMMENT_NOT_PUBLISHED) {
+    return FALSE;
+  }
+  return TRUE;
+}
+
+/**
  * Returns a menu title which includes the number of unapproved comments.
  */
 function comment_count_unpublished() {
Index: modules/comment/comment.pages.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.pages.inc,v
retrieving revision 1.28
diff -u -p -r1.28 comment.pages.inc
--- modules/comment/comment.pages.inc	1 Nov 2009 12:11:10 -0000	1.28
+++ modules/comment/comment.pages.inc	8 Nov 2009 06:41:15 -0000
@@ -101,16 +101,32 @@ function comment_reply(stdClass $node, $
 }
 
 /**
- * Menu callback; publish specified comment.
+ * Form builder to publish a comment.
  *
  * @param $comment
  *   A comment object.
+ *
+ * @see comment_approve_form_submit()
+ * @ingroup forms
  */
-function comment_approve($comment) {
+function comment_approve_form($form, &$form_state, $comment) {
+  $form['#comment'] = $comment;
+  return confirm_form($form, t('Are you sure you want to approve the comment %title?', array('%title' => $comment->subject)), referer_uri());
+}
+
+/**
+ * Form submit handler for comment approve form.
+ *
+ * @see comment_approve_form()
+ */
+function comment_approve_form_submit($form, &$form_state) {
+  $comment = $form['#comment'];
+
   $comment->status = COMMENT_PUBLISHED;
   $comment->comment_format = $comment->format;
   comment_save($comment);
 
   drupal_set_message(t('Comment approved.'));
-  drupal_goto('node/' . $comment->nid);
+  $form_state['redirect'] = 'node/' . $comment->nid;
 }
+
