Skip to:
Content

BuddyPress.org

Changeset 4381


Ignore:
Timestamp:
05/17/2011 07:25:55 PM (13 years ago)
Author:
djpaul
Message:

Reverting r4281 (see #3191)

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-loader.php

    r4378 r4381  
    9090        global $bp;
    9191
    92         // Stop if there is no user displayed
    93         if ( empty( $bp->displayed_user->id ) )
    94             return;
    95 
    96         // Determine user to use
    97         if ( !empty( $bp->displayed_user->domain ) )
    98             $user_domain = $bp->displayed_user->domain;
    99         else
    100             return;
    101            
    10292        // Add 'Activity' to the main navigation
    10393        $main_nav = array(
     
    10999            'item_css_id'         => $this->id
    110100        );
     101
     102        // Stop if there is no user displayed or logged in
     103        if ( !is_user_logged_in() && !isset( $bp->displayed_user->id ) )
     104            return;
     105
     106        // Determine user to use
     107        if ( isset( $bp->displayed_user->domain ) )
     108            $user_domain = $bp->displayed_user->domain;
     109        elseif ( isset( $bp->loggedin_user->domain ) )
     110            $user_domain = $bp->loggedin_user->domain;
     111        else
     112            return;
    111113
    112114        // User link
  • trunk/bp-blogs/bp-blogs-loader.php

    r4281 r4381  
    102102         */
    103103        if ( !is_multisite() )
    104             return;
    105 
    106         // Stop if there is no user displayed
    107         if ( empty( $bp->displayed_user->id ) )
    108             return;
     104            return false;
    109105
    110106        // Add 'Blogs' to the main navigation
    111         $main_nav = array(
     107        $main_nav =  array(
    112108            'name'                => sprintf( __( 'Blogs <span>(%d)</span>', 'buddypress' ), bp_blogs_total_blogs_for_user() ),
    113109            'slug'                => $this->slug,
  • trunk/bp-core/bp-core-component.php

    r4378 r4381  
    222222     */
    223223    function _setup_nav( $main_nav = '', $sub_nav = '' ) {
     224
    224225        // No sub nav items without a main nav item
    225226        if ( !empty( $main_nav ) ) {
  • trunk/bp-friends/bp-friends-loader.php

    r4378 r4381  
    9292    function _setup_nav() {
    9393        global $bp;
    94 
    95         // Stop if there is no user displayed
    96         if ( empty( $bp->displayed_user->id ) )
    97             return;
    9894
    9995        // Add 'Friends' to the main navigation
  • trunk/bp-members/bp-members-loader.php

    r4281 r4381  
    144144        global $bp;
    145145
    146         // Stop if there is no user displayed and not logged in
    147         if ( !is_user_logged_in() && empty( $bp->displayed_user->id ) )
    148             return;
    149 
    150146        // Add 'Profile' to the main navigation
    151147        if ( !bp_is_active( 'xprofile' ) ) {
     
    160156
    161157            // User links
    162             $user_domain   = ( !empty( $bp->displayed_user->domain ) )               ? $bp->displayed_user->domain               : $bp->loggedin_user->domain;
    163             $user_login    = ( !empty( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login;
     158            $user_domain   = ( isset( $bp->displayed_user->domain ) )               ? $bp->displayed_user->domain               : $bp->loggedin_user->domain;
     159            $user_login    = ( isset( $bp->displayed_user->userdata->user_login ) ) ? $bp->displayed_user->userdata->user_login : $bp->loggedin_user->userdata->user_login;
    164160            $profile_link  = trailingslashit( $user_domain . $bp->profile->slug );
    165161
  • trunk/bp-messages/bp-messages-loader.php

    r4378 r4381  
    9393        global $bp;
    9494
    95         // Stop if there is no user displayed
    96         if ( empty( $bp->displayed_user->id ) )
    97             return;
    98 
    9995        if ( $count = messages_get_unread_count() )
    10096            $name = sprintf( __( 'Messages <strong>(%s)</strong>', 'buddypress' ), $count );
  • trunk/bp-settings/bp-settings-loader.php

    r4281 r4381  
    6868    function _setup_nav() {
    6969        global $bp;
    70 
    71         // Stop if there is no user displayed
    72         if ( empty( $bp->displayed_user->id ) )
    73             return;
    7470
    7571        // Add the settings navigation item
  • trunk/bp-xprofile/bp-xprofile-loader.php

    r4378 r4381  
    111111        global $bp;
    112112
    113         // Stop if there is no user displayed
    114         if ( empty( $bp->displayed_user->id ) )
    115             return;
    116 
    117113        // Add 'Profile' to the main navigation
    118114        $main_nav = array(
Note: See TracChangeset for help on using the changeset viewer.