From 7193a5fa9d9ff410d957360890b6951b3fb7fb67 Mon Sep 17 00:00:00 2001 From: Matt Mullenweg Date: Thu, 8 Jul 2004 01:10:50 +0000 Subject: [PATCH] Register globals problem reported by Rich Bowen. git-svn-id: https://develop.svn.wordpress.org/trunk@1458 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/edit-comments.php | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/wp-admin/edit-comments.php b/wp-admin/edit-comments.php index 7511e16a90..eb4c32490e 100644 --- a/wp-admin/edit-comments.php +++ b/wp-admin/edit-comments.php @@ -39,21 +39,19 @@ function checkAll(form)

|

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")); - if (($user_level > $authordata->user_level) or ($user_login == $authordata->user_login)) { + $authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") ); + if ( ($user_level > $authordata->user_level) || ($user_login == $authordata->user_login) ) : $wpdb->query("DELETE FROM $wpdb->comments WHERE comment_ID = $comment"); ++$i; - } - } + endif; + endforeach; echo "

" . sprintf(__('%s comments deleted.'), $i) . "

"; -} +endif; if (isset($_GET['s'])) { $s = $wpdb->escape($_GET['s']);