WordPress.org

Making WordPress.org

Changeset 3005


Ignore:
Timestamp:
04/25/2016 04:22:10 PM (5 years ago)
Author:
ocean90
Message:

Translate, Consistency: Fix searches for originals with placeholders.

See #1682.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-consistency.php

    r3004 r3005  
    116116        }
    117117
    118         $results = $wpdb->get_results( $wpdb->prepare( "
     118        $locale = $wpdb->prepare( '%s', $locale );
     119        $slug = $wpdb->prepare( '%s', $slug );
     120
     121        $results = $wpdb->get_results( "
    119122            SELECT
    120123                p.name AS project_name,
     
    140143                AND t.status = 'current'
    141144                AND o.status = '+active' AND o.singular {$search}
    142                 AND ts.locale = '%s' AND ts.slug = '%s'
     145                AND ts.locale = {$locale} AND ts.slug = {$slug}
    143146            LIMIT 0, 500
    144             ",
    145             $locale,
    146             $slug
    147         ) );
     147        " );
    148148
    149149        if ( ! $results ) {
Note: See TracChangeset for help on using the changeset viewer.