diff --git a/modules/comment/comment.admin.inc b/modules/comment/comment.admin.inc index 2d2124a6e6d813c94d3f34fbcefb9f72ec8092bd..21f03e89aa6e669c1efd53dd74e9761ed641ffa9 100644 --- a/modules/comment/comment.admin.inc +++ b/modules/comment/comment.admin.inc @@ -84,7 +84,6 @@ function comment_admin_overview_validate($form, &$form_state) { $form_state['values']['comments'] = array_diff($form_state['values']['comments'], array(0)); if (count($form_state['values']['comments']) == 0) { form_set_error('', t('Please select one or more comments to perform the update on.')); - drupal_goto('admin/content/comment'); } } @@ -96,7 +95,7 @@ function comment_admin_overview_validate($form, &$form_state) { */ function comment_admin_overview_submit($form, &$form_state) { $operations = comment_operations(); - if ($operations[$form_state['values']['operation']][1]) { + 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) { diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 757de22a85cf43f9344cc1b36d4c2c3b17d1601f..67c135b34c29b65e84272bbc58ef559c922e4bf0 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1072,20 +1072,20 @@ function comment_operations($action = NULL) { if ($action == 'publish') { $operations = array( 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'), - 'delete' => array(t('Delete the selected comments'), '') + 'delete' => array(t('Delete the selected comments'), ''), ); } else if ($action == 'unpublish') { $operations = array( 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'), - 'delete' => array(t('Delete the selected comments'), '') + 'delete' => array(t('Delete the selected comments'), ''), ); } else { $operations = array( 'publish' => array(t('Publish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_PUBLISHED .' WHERE cid = %d'), 'unpublish' => array(t('Unpublish the selected comments'), 'UPDATE {comments} SET status = '. COMMENT_NOT_PUBLISHED .' WHERE cid = %d'), - 'delete' => array(t('Delete the selected comments'), '') + 'delete' => array(t('Delete the selected comments'), ''), ); } return $operations;