Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/02/2011 04:31:51 AM (16 years ago)
Author:
johnjamesjacoby
Message:

Added failsafes on the members component when other optional core components are deactivated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-members/bp-members-template.php

    r3982 r3993  
    215215
    216216        // Make sure we return no members if we looking at friendship requests and there are none.
    217         if ( empty( $include ) && bp_is_current_component( $bp->friends->slug ) && 'requests' == $bp->current_action )
     217        if ( empty( $include ) && bp_is_friends_component() && bp_is_current_action( 'requests' ) )
    218218                return false;
    219219
     
    444444                $update_content = apply_filters( 'bp_get_activity_latest_update', strip_tags( bp_create_excerpt( $update['content'], $length ) ) );
    445445
    446                 if ( !empty( $update['id'] ) )
    447                         $update_content .= ' &middot; <a href="' . bp_get_root_domain() . '/' . $bp->activity->root_slug . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';
     446                if ( !empty( $update['id'] ) && bp_is_active( 'activity' ) )
     447                        $update_content .= ' &middot; <a href="' . bp_get_root_domain() . '/' . bp_get_activity_root_slug() . '/p/' . $update['id'] . '">' . __( 'View', 'buddypress' ) . '</a>';
    448448
    449449                return apply_filters( 'bp_get_member_latest_update', $update_content );
Note: See TracChangeset for help on using the changeset viewer.