Changeset 3013 for sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-consistency.php
- Timestamp:
- 04/26/2016 02:23:48 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/wporg-gp-routes/inc/routes/class-consistency.php
r3007 r3013 22 22 23 23 $search = $set = ''; 24 $search_fuzzy = false;25 24 $search_case_sensitive = true; 26 25 … … 40 39 } 41 40 42 if ( ! empty( $_REQUEST['search_fuzzy'] ) ) {43 $search_fuzzy = true;44 }45 46 41 $locale_is_rtl = false; 47 42 if ( $set ) { … … 57 52 'search' => $search, 58 53 'set' => $set, 59 'fuzzy' => $search_fuzzy,60 54 'case_sensitive' => $search_case_sensitive, 61 55 ] ); … … 110 104 } 111 105 112 if ( $args['fuzzy'] ) { 113 $search = $wpdb->prepare( "LIKE {$collation} %s", $wpdb->esc_like( $args['search'] ) . '%%' ); 114 } else { 115 $search = $wpdb->prepare( "= {$collation} %s", $args['search'] ); 116 } 106 $search = $wpdb->prepare( "= {$collation} %s", $args['search'] ); 117 107 118 108 $locale = $wpdb->prepare( '%s', $locale ); … … 133 123 t.id AS translation_id 134 124 FROM {$wpdb->gp_originals} AS o 135 JOIN 125 JOIN 136 126 {$wpdb->gp_projects} AS p ON p.id = o.project_id 137 JOIN 127 JOIN 138 128 {$wpdb->gp_translations} AS t ON o.id = t.original_id 139 129 JOIN … … 141 131 WHERE 142 132 p.active = 1 143 AND t.status = 'current' 133 AND t.status = 'current' 144 134 AND o.status = '+active' AND o.singular {$search} 145 135 AND ts.locale = {$locale} AND ts.slug = {$slug}
Note: See TracChangeset
for help on using the changeset viewer.