Ticket #2600: 2600-1.patch
File 2600-1.patch, 3.7 KB (added by , 13 years ago) |
---|
-
bp-core/bp-core-templatetags.php
1741 1741 function bp_is_user_groups() { 1742 1742 global $bp; 1743 1743 1744 if ( $bp->groups-> slug == $bp->current_component )1744 if ( $bp->groups->mid_slug == $bp->current_component ) 1745 1745 return true; 1746 1746 1747 1747 return false; -
bp-core/bp-core-catchuri.php
139 139 140 140 unset( $uri_chunks ); 141 141 } 142 142 143 143 // Search doesn't have an associated page, so we check for it separately 144 144 if ( !empty( $bp_uri[0] ) && BP_SEARCH_SLUG == $bp_uri[0] ) 145 145 $matches[] = 1; -
bp-groups.php
9 9 10 10 if ( !defined( 'BP_GROUPS_SLUG' ) ) 11 11 define ( 'BP_GROUPS_SLUG', $bp->pages->groups->slug ); 12 13 if ( !defined( 'BP_GROUPS_MID_SLUG' ) ) { 14 if ( strpos( BP_GROUPS_SLUG, '/' ) ) { 15 define( 'BP_GROUPS_MID_SLUG', 'groups' ); 16 } else { 17 define( 'BP_GROUPS_MID_SLUG', BP_GROUPS_SLUG ); 18 } 19 } 12 20 13 21 /* For internal identification */ 14 22 $bp->groups->id = 'groups'; 15 23 $bp->groups->name = $bp->pages->groups->name; 16 24 $bp->groups->slug = BP_GROUPS_SLUG; 25 $bp->groups->mid_slug = BP_GROUPS_MID_SLUG; 17 26 18 27 $bp->groups->table_name = $bp->table_prefix . 'bp_groups'; 19 28 $bp->groups->table_name_members = $bp->table_prefix . 'bp_groups_members'; … … 71 80 } 72 81 73 82 /* Add 'Groups' to the main navigation */ 74 bp_core_new_nav_item( array( 'name' => sprintf( __( 'Groups <span>(%d)</span>', 'buddypress' ), groups_total_groups_for_user() ), 'slug' => $bp->groups-> name, 'position' => 70, 'screen_function' => 'groups_screen_my_groups', 'default_subnav_slug' => 'my-groups', 'item_css_id' => $bp->groups->id ) );83 bp_core_new_nav_item( array( 'name' => sprintf( __( 'Groups <span>(%d)</span>', 'buddypress' ), groups_total_groups_for_user() ), 'slug' => $bp->groups->mid_slug, 'position' => 70, 'screen_function' => 'groups_screen_my_groups', 'default_subnav_slug' => 'my-groups', 'item_css_id' => $bp->groups->id ) ); 75 84 76 $groups_link = $bp->loggedin_user->domain . $bp->groups-> name. '/';85 $groups_link = $bp->loggedin_user->domain . $bp->groups->mid_slug . '/'; 77 86 78 87 /* Add the subnav items to the groups nav item */ 79 bp_core_new_subnav_item( array( 'name' => __( 'My Groups', 'buddypress' ), 'slug' => 'my-groups', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups-> name, 'screen_function' => 'groups_screen_my_groups', 'position' => 10, 'item_css_id' => 'groups-my-groups' ) );80 bp_core_new_subnav_item( array( 'name' => __( 'Invites', 'buddypress' ), 'slug' => 'invites', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups-> name, 'screen_function' => 'groups_screen_group_invites', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );88 bp_core_new_subnav_item( array( 'name' => __( 'My Groups', 'buddypress' ), 'slug' => 'my-groups', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->mid_slug, 'screen_function' => 'groups_screen_my_groups', 'position' => 10, 'item_css_id' => 'groups-my-groups' ) ); 89 bp_core_new_subnav_item( array( 'name' => __( 'Invites', 'buddypress' ), 'slug' => 'invites', 'parent_url' => $groups_link, 'parent_slug' => $bp->groups->mid_slug, 'screen_function' => 'groups_screen_group_invites', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) ); 81 90 82 91 if ( $bp->current_component == $bp->groups->slug ) { 83 92