Index: modules/comment/comment.admin.inc
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.admin.inc,v
retrieving revision 1.43
diff -u -p -r1.43 comment.admin.inc
--- modules/comment/comment.admin.inc	22 Feb 2010 15:38:52 -0000	1.43
+++ modules/comment/comment.admin.inc	2 Mar 2010 09:55:16 -0000
@@ -160,6 +160,8 @@ function comment_admin_overview_submit($
     foreach ($form_state['values']['comments'] as $cid => $value) {
       if ($value) {
         // Perform the update action, then refresh node statistics.
+        $conditions = &$query->conditions();
+        $conditions = array();
         $query
           ->condition('cid', $cid )
           ->execute();
Index: modules/comment/comment.test
===================================================================
RCS file: /cvs/drupal/drupal/modules/comment/comment.test,v
retrieving revision 1.69
diff -u -p -r1.69 comment.test
--- modules/comment/comment.test	15 Feb 2010 15:12:22 -0000	1.69
+++ modules/comment/comment.test	2 Mar 2010 09:55:17 -0000
@@ -211,17 +211,19 @@ class CommentHelperCase extends DrupalWe
   /**
    * Perform the specified operation on the specified comment.
    *
-   * @param object $comment
-   *   Comment to perform operation on.
+   * @param array $comments
+   *   Array of comments to perform operation on.
    * @param string $operation
    *   Operation to perform.
    * @param boolean $aproval
    *   Operation is found on approval page.
    */
-  function performCommentOperation($comment, $operation, $approval = FALSE) {
+  function performCommentsOperation($comments, $operation, $approval = FALSE) {
     $edit = array();
     $edit['operation'] = $operation;
-    $edit['comments[' . $comment->id . ']'] = TRUE;
+    foreach ($comments as $comment) {
+      $edit['comments[' . $comment->id . ']'] = TRUE;
+    }
     $this->drupalPost('admin/content/comment' . ($approval ? '/approval' : ''), $edit, t('Update'));
 
     if ($operation == 'delete') {
@@ -535,19 +537,19 @@ class CommentAnonymous extends CommentHe
 
     // Unpublish comment.
     $this->drupalLogin($this->admin_user);
-    $this->performCommentOperation($anonymous_comment3, 'unpublish');
+    $this->performCommentsOperation(array($anonymous_comment3), 'unpublish');
 
     $this->drupalGet('admin/content/comment/approval');
     $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was unpublished.'));
 
     // Publish comment.
-    $this->performCommentOperation($anonymous_comment3, 'publish', TRUE);
+    $this->performCommentsOperation(array($anonymous_comment3), 'publish', TRUE);
 
     $this->drupalGet('admin/content/comment');
     $this->assertRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was published.'));
 
     // Delete comment.
-    $this->performCommentOperation($anonymous_comment3, 'delete');
+    $this->performCommentsOperation(array($anonymous_comment3), 'delete');
 
     $this->drupalGet('admin/content/comment');
     $this->assertNoRaw('comments[' . $anonymous_comment3->id . ']', t('Comment was deleted.'));
@@ -877,24 +879,43 @@ class CommentApprovalTest extends Commen
     // Post anonymous comment without contact info.
     $subject = $this->randomName();
     $body = $this->randomName();
-    $this->postComment($this->node, $body, $subject, TRUE); // Set $contact to true so that it won't check for id and message.
+    // Set $contact to true so that it won't check for id and message.
+    $this->postComment($this->node, $body, $subject, TRUE);
+    $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), t('Comment requires approval.'));
+
+    // Post another anonymous comment without contact info.
+    $subject2 = $this->randomName();
+    $body2 = $this->randomName();
+    // Set $contact to true so that it won't check for id and message.
+    $this->postComment($this->node, $body2, $subject2, TRUE);
     $this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'), t('Comment requires approval.'));
 
     // Get unapproved comment id.
     $this->drupalLogin($this->admin_user);
-    $anonymous_comment4 = $this->getUnapprovedComment($subject);
-    $anonymous_comment4 = (object) array('id' => $anonymous_comment4, 'subject' => $subject, 'comment' => $body);
+    $anonymous_comment1 = $this->getUnapprovedComment($subject);
+    $anonymous_comment1 = (object) array('id' => $anonymous_comment1, 'subject' => $subject, 'comment' => $body);
+    $anonymous_comment2 = $this->getUnapprovedComment($subject2);
+    $anonymous_comment2 = (object) array('id' => $anonymous_comment2, 'subject' => $subject2, 'comment' => $body2);
     $this->drupalLogout();
 
-    $this->assertFalse($this->commentExists($anonymous_comment4), t('Anonymous comment was not published.'));
+    $this->assertFalse($this->commentExists($anonymous_comment1), t('First anonymous comment was not published.'));
+    $this->assertFalse($this->commentExists($anonymous_comment2), t('Second anonymous comment was not published.'));
 
     // Approve comment.
     $this->drupalLogin($this->admin_user);
-    $this->performCommentOperation($anonymous_comment4, 'publish', TRUE);
+    $this->performCommentsOperation(array($anonymous_comment1), 'publish', TRUE);
     $this->drupalLogout();
 
     $this->drupalGet('node/' . $this->node->nid);
-    $this->assertTrue($this->commentExists($anonymous_comment4), t('Anonymous comment visible.'));
+    $this->assertTrue($this->commentExists($anonymous_comment1), t('First anonymous comment visible.'));
+
+    // Approve both comments in one operation.
+    $this->drupalLogin($this->admin_user);
+    $this->performCommentsOperation(array($anonymous_comment1), 'unpublish');
+    $this->performCommentsOperation(array($anonymous_comment1, $anonymous_comment2), 'publish', TRUE);
+    $this->drupalGet('node/' . $this->node->nid);
+    $this->assertTrue($this->commentExists($anonymous_comment1), t('First anonymous comment visible.'));
+    $this->assertTrue($this->commentExists($anonymous_comment2), t('First anonymous comment visible.'));
   }
 
   /**
