Ticket #4060: 4060-fix-search.001.patch
File 4060-fix-search.001.patch, 920 bytes (added by , 13 years ago) |
---|
-
bp-core/bp-core-classes.php
class BP_User_Query { 295 295 // To avoid global joins, do a separate query 296 296 // @todo remove need for bp_is_active() check 297 297 if ( false !== $search_terms && bp_is_active( 'xprofile' ) ) { 298 $found_user_ids = $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE %s", '%%' . like_escape( $search_terms ) . '%%' ) , ARRAY_N);298 $found_user_ids = $wpdb->get_col( $wpdb->prepare( "SELECT user_id FROM {$bp->profile->table_name_data} WHERE value LIKE %s", '%%' . like_escape( $search_terms ) . '%%' ) ); 299 299 300 300 if ( ! empty( $found_user_ids ) ) { 301 301 $sql['where'][] = "u.{$this->uid_name} IN (" . implode( ',', wp_parse_id_list( $found_user_ids ) ) . ")";