Fix boulk comment delete. Bug 291. Patch from ringmaster.
git-svn-id: http://svn.automattic.com/wordpress/trunk@1690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
884ebec4f5
commit
6cfc34b013
|
@ -38,7 +38,7 @@ function checkAll(form)
|
||||||
<?php
|
<?php
|
||||||
if ( !empty( $_POST['delete_comments'] ) ) :
|
if ( !empty( $_POST['delete_comments'] ) ) :
|
||||||
$i = 0;
|
$i = 0;
|
||||||
foreach ($delete_comments as $comment) : // Check the permissions on each
|
foreach ($_POST['delete_comments'] as $comment) : // Check the permissions on each
|
||||||
$comment = (int) $comment;
|
$comment = (int) $comment;
|
||||||
$post_id = $wpdb->get_var("SELECT comment_post_ID FROM $wpdb->comments WHERE comment_ID = $comment");
|
$post_id = $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") );
|
$authordata = get_userdata( $wpdb->get_var("SELECT post_author FROM $wpdb->posts WHERE ID = $post_id") );
|
||||||
|
|
Loading…
Reference in New Issue