Skip to content

Commit

Permalink
Remove usage of like_escape
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke Carbis committed Jul 10, 2014
1 parent 9a91ada commit 5ee4b84
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions classes/class-wp-stream-query.php
Expand Up @@ -160,8 +160,8 @@ public function query( $args ) {
* PARSE CUSTOM CORE FILTERS
*/
if ( $args['search'] && $args['search_field'] ) {
$search_field = $args['search_field'];
$query[ $search_field ]['like'] = $args['search'];
$search_field = esc_sql( $args['search_field'] );
$query[ $search_field ]['like'] = esc_sql( $args['search'] );
}

if ( $args['record_greater_than'] ) {
Expand Down
2 changes: 1 addition & 1 deletion classes/class-wp-stream-settings.php
Expand Up @@ -172,8 +172,8 @@ public static function get_ips(){
array(
'fields' => 'ip',
'distinct' => true,
'search' => like_escape( $_POST['find'] ),
'search_field' => 'ip',
'search' => wp_stream_filter_input( INPUT_POST, 'find' ),
'records_per_page' => wp_stream_filter_input( INPUT_POST, 'limit' ),
)
);
Expand Down

0 comments on commit 5ee4b84

Please sign in to comment.