Skip to:
Content

bbPress.org


Ignore:
Timestamp:
09/26/2017 07:11:40 PM (9 years ago)
Author:
johnjamesjacoby
Message:

Tools: Remove quotes from prepared query statements.

Also use the same esc_like() result in 2 matched queries.

Props jrf. Fixes #3168.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/admin/tools/repair.php

    r6668 r6715  
    10141014    $bbp_db        = bbp_db();
    10151015    $statement     = esc_html__( 'Repairing closed topics… %s', 'bbpress' );
    1016     $result        = esc_html__( 'No closed topics to repair.', 'bbpress' );
     1016    $result        = esc_html__( 'No closed topics to repair.',        'bbpress' );
    10171017    $changed       = 0;
    10181018
    10191019    // Results
    1020     $query         = "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = '%s' AND `post_status` = 'closed'";
    1021     $prepare       = $bbp_db->prepare( $query, bbp_get_topic_post_type() );
     1020    $query         = "SELECT ID FROM `{$bbp_db->posts}` WHERE `post_type` = %s AND `post_status` = %s";
     1021    $prepare       = $bbp_db->prepare( $query, bbp_get_topic_post_type(), bbp_get_closed_status_id() );
    10221022    $closed_topics = $bbp_db->get_col( $prepare );
    10231023
Note: See TracChangeset for help on using the changeset viewer.