Make WordPress Core

Ticket #49239: edit-comments.php.patch

File edit-comments.php.patch, 1.2 KB (added by pikamander2, 6 years ago)
  • edit-comments.php

     
    2424if ( $doaction ) {
    2525        check_admin_referer( 'bulk-comments' );
    2626
    27         if ( 'delete_all' == $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) {
     27        if ( 'delete_all' === $doaction && ! empty( $_REQUEST['pagegen_timestamp'] ) ) {
    2828                $comment_status = wp_unslash( $_REQUEST['comment_status'] );
    2929                $delete_time    = wp_unslash( $_REQUEST['pagegen_timestamp'] );
    3030                $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 ) );
     
    3131                $doaction       = 'delete';
    3232        } elseif ( isset( $_REQUEST['delete_comments'] ) ) {
    3333                $comment_ids = $_REQUEST['delete_comments'];
    34                 $doaction    = ( $_REQUEST['action'] != -1 ) ? $_REQUEST['action'] : $_REQUEST['action2'];
     34                $doaction    = ( -1 !== $_REQUEST['action'] ) ? $_REQUEST['action'] : $_REQUEST['action2'];
    3535        } elseif ( isset( $_REQUEST['ids'] ) ) {
    3636                $comment_ids = array_map( 'absint', explode( ',', $_REQUEST['ids'] ) );
    3737        } elseif ( wp_get_referer() ) {