From 12de05107e4c8b006bde6ee8916f34eb476d08da Mon Sep 17 00:00:00 2001 From: donncha Date: Fri, 13 Jun 2008 17:21:00 +0000 Subject: WP Merge with revision 8075 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1328 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/edit-comments.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'wp-admin/edit-comments.php') diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index c756efe..6bb04aa 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -12,8 +12,7 @@ if ( !empty( $_REQUEST['delete_comments'] ) ) { $comments_deleted = $comments_approved = $comments_unapproved = $comments_spammed = 0; foreach ($_REQUEST['delete_comments'] as $comment) : // Check the permissions on each $comment = (int) $comment; - $post_id = (int) $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment"); - // $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); + $post_id = (int) $wpdb->get_var( $wpdb->prepare( "SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = %d", $comment) ); if ( !current_user_can('edit_post', $post_id) ) continue; if ( !empty( $_REQUEST['spamit'] ) ) { @@ -117,6 +116,7 @@ unset($status_links);

+

@@ -132,22 +132,24 @@ unset($status_links); add_query_arg( 'apage', '%#%' ), 'format' => '', - 'total' => ceil($total / 20), + 'total' => ceil($total / $comments_per_page), 'current' => $page )); @@ -186,7 +188,7 @@ if ($comments) { - + -- cgit