Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
04/13/2010 04:01:07 PM (14 years ago)
Author:
apeatling
Message:

Replacing function_exists() checks with bp_is_active() checks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-friends/bp-friends-classes.php

    r2362 r2919  
    157157
    158158        // filter the user_ids based on the search criteria.
    159         if ( function_exists('xprofile_install') ) {
     159        if ( bp_is_active( 'xprofile' ) ) {
    160160            $sql = "SELECT DISTINCT user_id FROM {$bp->profile->table_name_data} WHERE user_id IN ($fids) AND value LIKE '$filter%%' {$pag_sql}";
    161161            $total_sql = "SELECT COUNT(DISTINCT user_id) FROM {$bp->profile->table_name_data} WHERE user_id IN ($fids) AND value LIKE '$filter%%'";
     
    223223
    224224        // filter the user_ids based on the search criteria.
    225         if ( function_exists('xprofile_install') ) {
     225        if ( bp_is_active( 'xprofile' ) ) {
    226226            $sql = $wpdb->prepare( "SELECT DISTINCT d.user_id as id FROM {$bp->profile->table_name_data} d, $users_table u WHERE d.user_id = u.id AND d.value LIKE '$filter%%' ORDER BY d.value DESC $pag_sql" );
    227227        } else {
     
    246246
    247247        // filter the user_ids based on the search criteria.
    248         if ( function_exists('xprofile_install') ) {
     248        if ( bp_is_active( 'xprofile' ) ) {
    249249            $sql = $wpdb->prepare( "SELECT COUNT(DISTINCT d.user_id) FROM {$bp->profile->table_name_data} d, $users_table u WHERE d.user_id = u.id AND d.value LIKE '$filter%%'" );
    250250        } else {
     
    263263        global $wpdb, $bp;
    264264
    265         if ( !function_exists( 'xprofile_install') )
     265        if ( !bp_is_active( 'xprofile' ) )
    266266            return false;
    267267
Note: See TracChangeset for help on using the changeset viewer.