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' => '