Ticket #49239: edit-comments.php.patch
| File edit-comments.php.patch, 1.2 KB (added by , 6 years ago) |
|---|
-
edit-comments.php
24 24 if ( $doaction ) { 25 25 check_admin_referer( 'bulk-comments' ); 26 26 27 if ( 'delete_all' == $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) {27 if ( 'delete_all' === $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) { 28 28 $comment_status = wp_unslash( $_REQUEST['comment_status'] ); 29 29 $delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] ); 30 30 $comment_ids = $wpdb->get_col( $wpdb->prepare( "SELECT comment_ID FROM $wpdb->comments WHERE comment_approved = %s AND %s > comment_date_gmt", $comment_status, $delete_time ) ); … … 31 31 $doaction = 'delete'; 32 32 } elseif ( isset( $_REQUEST['delete_comments'] ) ) { 33 33 $comment_ids = $_REQUEST['delete_comments']; 34 $doaction = ( $_REQUEST['action'] != -1) ? $_REQUEST['action'] : $_REQUEST['action2'];34 $doaction = ( -1 !== $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2']; 35 35 } elseif ( isset( $_REQUEST['ids'] ) ) { 36 36 $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) ); 37 37 } elseif ( wp_get_referer() ) {