Skip to:
Content

BuddyPress.org

Changeset 3450


Ignore:
Timestamp:
11/19/2010 07:53:41 PM (14 years ago)
Author:
djpaul
Message:

Update alot of old-style component checks. Partial fix for #2718.

Location:
trunk
Files:
3 edited

Legend:

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

    r3371 r3450  
    167167        }
    168168
    169         if ( $search_terms && function_exists( 'xprofile_install' ) ) {
     169        if ( $search_terms && bp_is_active( 'xprofile' ) ) {
    170170            $search_terms = like_escape( $wpdb->escape( $search_terms ) );
    171171            $sql['where_searchterms'] = "AND pd.value LIKE '%%$search_terms%%'";
  • trunk/bp-core/bp-core-templatetags.php

    r3449 r3450  
    990990    global $bp;
    991991
    992     if ( function_exists( 'xprofile_install' )
    993          || function_exists( 'groups_install' )
    994          || ( function_exists( 'bp_blogs_install' ) && is_multisite() )
     992    if ( bp_is_active( 'xprofile' )
     993         || bp_is_active( 'groups' )
     994         || ( bp_is_active( 'blogs' ) && is_multisite() )
    995995         || ( function_exists( 'bp_forums_setup' ) && !(int)$bp->site_options['bp-disable-forum-directory'] )
    996996        ) {
  • trunk/bp-forums.php

    r3365 r3450  
    393393
    394394    /* Fetch fullname for the topic's last poster */
    395     if ( function_exists( 'xprofile_install' ) ) {
     395    if ( bp_is_active( 'xprofile' ) ) {
    396396        $poster_names = $wpdb->get_results( $wpdb->prepare( "SELECT t.topic_id, pd.value FROM {$bp->profile->table_name_data} pd, {$bbdb->topics} t WHERE pd.user_id = t.topic_last_poster AND pd.field_id = 1 AND t.topic_id IN ( {$topic_ids} )" ) );
    397397        for ( $i = 0; $i < count( $topics ); $i++ ) {
     
    511511
    512512    /* Fetch fullname for each poster. */
    513     if ( function_exists( 'xprofile_install' ) ) {
     513    if ( bp_is_active( 'xprofile' ) ) {
    514514        $poster_names = $wpdb->get_results( $wpdb->prepare( "SELECT pd.user_id, pd.value FROM {$bp->profile->table_name_data} pd WHERE pd.user_id IN ( {$user_ids} )" ) );
    515515        for ( $i = 0; $i < count( $posts ); $i++ ) {
Note: See TracChangeset for help on using the changeset viewer.