Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.69
diff -u -r1.69 comment.test
--- modules/comment/comment.test	15 Feb 2010 15:12:22 -0000	1.69
+++ modules/comment/comment.test	23 Feb 2010 12:59:09 -0000
@@ -895,6 +895,33 @@
 
     $this->drupalGet('node/' . $this->node->nid);
     $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.'));
+
+    // Post 2 anonymous comments without contact info.
+    $comments[] = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
+    $comments[] = $this->postComment($this->node, $this->randomName(), $this->randomName(), TRUE);
+
+    // Publish multiple comments in one operation.
+    $this->drupalLogin($this->admin_user);
+    $this->drupalGet('admin/content/comment/approval');
+    $this->assertText(t('Unapproved comments (@count)', array('@count' => 2)), t('Two unapproved comments waiting for approval.'));
+    $edit = array(
+      "comments[{$comments[0]->id}]" => 1,
+      "comments[{$comments[1]->id}]" => 1,
+    );
+    $this->drupalPost(NULL, $edit, t('Update'));
+    $this->assertText(t('Unapproved comments (@count)', array('@count' => 0)), t('All comments were approved.'));
+
+    // Delete multiple comments in one operation.
+    $edit = array(
+      'operation' => 'delete',
+      "comments[{$comments[0]->id}]" => 1,
+      "comments[{$comments[1]->id}]" => 1,
+      "comments[{$anonymous_comment4->id}]" => 1,
+    );
+    $this->drupalPost(NULL, $edit, t('Update'));
+    $this->assertText(t('Are you sure you want to delete these comments and all their children?'), t('Confirmation required.'));
+    $this->drupalPost(NULL, $edit, t('Delete comments'));
+    $this->assertText(t('No comments available.'), t('All comments were deleted.'));
   }
 
   /**
Index: modules/comment/comment.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.846
diff -u -r1.846 comment.module
--- modules/comment/comment.module	22 Feb 2010 15:38:52 -0000	1.846
+++ modules/comment/comment.module	23 Feb 2010 12:59:08 -0000
@@ -1531,39 +1531,6 @@
 }
 
 /**
- * Comment operations. Offer different update operations depending on
- * which comment administration page is being viewed.
- *
- * @param $action
- *   The comment administration page.
- * @return
- *   An associative array containing the offered operations.
- */
-function comment_operations($action = NULL) {
-  if ($action == 'publish') {
-    $operations = array(
-      'publish' => array(t('Publish the selected comments'), db_update('comment')->fields(array('status' => COMMENT_PUBLISHED))),
-      'delete' => array(t('Delete the selected comments'), ''),
-    );
-  }
-  elseif ($action == 'unpublish') {
-    $operations = array(
-      'unpublish' => array(t('Unpublish the selected comments'), db_update('comment')->fields(array('status' => COMMENT_NOT_PUBLISHED))),
-      'delete' => array(t('Delete the selected comments'), ''),
-    );
-  }
-  else {
-    $operations = array(
-      'publish' => array(t('Publish the selected comments'), db_update('comment')->fields(array('status' => COMMENT_PUBLISHED))),
-      'unpublish' => array(t('Unpublish the selected comments'), db_update('comment')->fields(array('status' => COMMENT_NOT_PUBLISHED))),
-      'delete' => array(t('Delete the selected comments'), ''),
-    );
-  }
-
-  return $operations;
-}
-
-/**
  * Load comments from the database.
  *
  * @param $cids
Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.43
diff -u -r1.43 comment.admin.inc
--- modules/comment/comment.admin.inc	22 Feb 2010 15:38:52 -0000	1.43
+++ modules/comment/comment.admin.inc	23 Feb 2010 12:59:06 -0000
@@ -42,10 +42,15 @@
     '#prefix' => '<div class="container-inline">',
     '#suffix' => '</div>',
   );
-  $options = array();
-  foreach (comment_operations($arg == 'approval' ? 'publish' : 'unpublish') as $key => $value) {
-    $options[$key] = $value[0];
+
+  if ($arg == 'approval') {
+    $options['publish'] = t('Publish the selected comments');
+  }
+  else {
+    $options['unpublish'] = t('Unpublish the selected comments');
   }
+  $options['delete'] = t('Delete the selected comments');
+
   $form['options']['operation'] = array(
     '#type' => 'select',
     '#options' => $options,
@@ -153,28 +158,28 @@
  * publishing, unpublishing or deleting.
  */
 function comment_admin_overview_submit($form, &$form_state) {
-  $operations = comment_operations();
-  if (!empty($operations[$form_state['values']['operation']][1])) {
-    // Extract the appropriate database query operation.
-    $query = $operations[$form_state['values']['operation']][1];
-    foreach ($form_state['values']['comments'] as $cid => $value) {
-      if ($value) {
-        // Perform the update action, then refresh node statistics.
-        $query
-          ->condition('cid', $cid )
-          ->execute();
-        $comment = comment_load($cid);
-        _comment_update_node_statistics($comment->nid);
-        // Allow modules to respond to the updating of a comment.
-        module_invoke_all('comment_' . $form_state['values']['operation'], $comment);
-        // Add an entry to the watchdog log.
-        watchdog('content', 'Comment: updated %subject.', array('%subject' => $comment->subject), WATCHDOG_NOTICE, l(t('view'), 'node/' . $comment->nid, array('fragment' => 'comment-' . $comment->cid)));
+  $operation = $form_state['values']['operation'];
+  $cids = $form_state['values']['comments'];
+
+  if ($operation == 'delete') {
+    comment_delete_multiple($cids);
+    cache_clear_all();
+  }
+  else {
+    foreach ($cids as $cid => $value) {
+      $comment = comment_load($value);
+
+      if ($operation == 'unpublish') {
+        $comment->status = COMMENT_NOT_PUBLISHED;
       }
+      else if ($operation == 'publish') {
+        $comment->status = COMMENT_PUBLISHED;
+      }
+      comment_save($comment);
     }
-    cache_clear_all();
-    drupal_set_message(t('The update has been performed.'));
-    $form_state['redirect'] = 'admin/content/comment';
   }
+  drupal_set_message(t('The update has been performed.'));
+  $form_state['redirect'] = 'admin/content/comment';
 }
 
 /**
