Skip to:
Content

BuddyPress.org

Changeset 7016


Ignore:
Timestamp:
05/08/2013 12:29:59 AM (12 years ago)
Author:
johnjamesjacoby
Message:

Remove calls to trim() introduced in r7014 to still allow searching for beginning or ending spaces. See #4989.

Location:
branches/1.7
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/1.7/bp-core/bp-core-classes.php

    r7014 r7016  
    837837
    838838        if ( !empty( $search_terms ) && bp_is_active( 'xprofile' ) ) {
    839             $search_terms             = esc_sql( like_escape( trim( $search_terms ) ) );
     839            $search_terms             = esc_sql( like_escape( $search_terms ) );
    840840            $sql['where_searchterms'] = "AND spd.value LIKE '%%$search_terms%%'";
    841841        }
     
    954954        }
    955955
    956         $letter     = esc_sql( like_escape( trim( $letter ) ) );
     956        $letter     = esc_sql( like_escape( $letter ) );
    957957        $status_sql = bp_core_get_status_sql( 'u.' );
    958958
     
    10521052        $pag_sql  = $limit && $page ? $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * intval( $limit ) ), intval( $limit ) ) : '';
    10531053
    1054         $search_terms = esc_sql( like_escape( trim( $search_terms ) ) );
     1054        $search_terms = esc_sql( like_escape( $search_terms ) );
    10551055        $status_sql   = bp_core_get_status_sql( 'u.' );
    10561056
  • branches/1.7/bp-groups/bp-groups-classes.php

    r7014 r7016  
    479479
    480480        if ( !empty( $search_terms ) ) {
    481             $search_terms = esc_sql( like_escape( trim( $search_terms ) ) );
     481            $search_terms = esc_sql( like_escape( $search_terms ) );
    482482            $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
    483483        }
     
    521521
    522522        if ( !empty( $search_terms ) ) {
    523             $search_terms = esc_sql( like_escape( trim( $search_terms ) ) );
     523            $search_terms = esc_sql( like_escape( $search_terms ) );
    524524            $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
    525525        }
     
    604604
    605605        if ( !empty( $search_terms ) ) {
    606             $search_terms = esc_sql( like_escape( trim( $search_terms ) ) );
     606            $search_terms = esc_sql( like_escape( $search_terms ) );
    607607            $search_sql = " AND ( g.name LIKE '%%{$search_terms}%%' OR g.description LIKE '%%{$search_terms}%%' )";
    608608        }
     
    10491049
    10501050        if ( !empty( $filter ) ) {
    1051             $filter     = esc_sql( like_escape( trim( $filter ) ) );
     1051            $filter     = esc_sql( like_escape( $filter ) );
    10521052            $filter_sql = " AND ( g.name LIKE '%%{$filter}%%' OR g.description LIKE '%%{$filter}%%' )";
    10531053        }
Note: See TracChangeset for help on using the changeset viewer.