Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.41
diff -u -p -1 -4 -r1.41 comment.admin.inc
--- modules/comment/comment.admin.inc	30 Jan 2010 07:59:24 -0000	1.41
+++ modules/comment/comment.admin.inc	3 Feb 2010 09:59:49 -0000
@@ -144,32 +144,40 @@ function comment_admin_overview_validate
   if (count($form_state['values']['comments']) == 0) {
     form_set_error('', t('Select one or more comments to perform the update on.'));
   }
 }
 
 /**
  * Process comment_admin_overview form submissions.
  *
  * Execute the chosen 'Update option' on the selected comments, such as
  * 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) {
+        // Unfortunately, since we 'destroy' our query object
+        // by adding a condition to it that is incompatible
+        // with the condition in the next iteration, we need
+        // to re-fetch the query object with a call to
+        // comment_operations.
+        $operations = comment_operations();
+
+        // Extract the appropriate database query operation.
+        $query = $operations[$form_state['values']['operation']][1];
+
         // 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)));
       }
     }
     cache_clear_all();
     drupal_set_message(t('The update has been performed.'));
Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.66
diff -u -p -1 -4 -r1.66 comment.test
--- modules/comment/comment.test	30 Jan 2010 07:59:24 -0000	1.66
+++ modules/comment/comment.test	2 Feb 2010 22:04:11 -0000
@@ -884,28 +884,43 @@ class CommentApprovalTest extends Commen
     $this->drupalLogin($this->admin_user);
     $anonymous_comment4 = $this->getUnapprovedComment($subject);
     $anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body);
     $this->drupalLogout();
 
     $this->assertFalse($this->commentExists($anonymous_comment4), t('Anonymous comment was not published.'));
 
     // Approve comment.
     $this->drupalLogin($this->admin_user);
     $this->performCommentOperation($anonymous_comment4, 'publish', TRUE);
     $this->drupalLogout();
 
     $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.'));
   }
 
   /**
    * Test comment approval functionality through node interface.
    */
   function testApprovalNodeInterface() {
     // Set anonymous comments to require approval.
     user_role_change_permissions(DRUPAL_ANONYMOUS_RID, array(
       'access comments' => TRUE,
       'post comments' => TRUE,
       'post comments without approval' => FALSE,
     ));
     $this->drupalLogin($this->admin_user);
     $this->setCommentAnonymous('0'); // Ensure that doesn't require contact info.
