Changeset 3983
- Timestamp:
- 02/01/2011 07:53:50 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-template.php
r3982 r3983 543 543 function bp_current_action() { 544 544 global $bp; 545 return apply_filters( 'bp_current_action', $bp->current_action ); 545 $current_action = !empty( $bp->current_action ) ? $bp->current_action : false; 546 return apply_filters( 'bp_current_action', $current_action ); 546 547 } 547 548 548 549 function bp_current_item() { 549 550 global $bp; 550 return apply_filters( 'bp_current_item', $bp->current_item ); 551 $current_item = !empty( $bp->current_item ) ? $bp->current_item : false; 552 return apply_filters( 'bp_current_item', $current_item ); 551 553 } 552 554 553 555 function bp_action_variables() { 554 556 global $bp; 555 return apply_filters( 'bp_action_variables', $bp->action_variables ); 557 $action_variables = !empty( $bp->action_variables ) ? $bp->action_variables : false; 558 return apply_filters( 'bp_action_variables', $action_variables ); 556 559 } 557 560 … … 738 741 739 742 function bp_is_current_item( $item = '' ) { 740 global $bp; 741 742 if ( $item == $bp->current_item ) 743 if ( !empty( $item ) && $item == bp_current_item() ) 743 744 return true; 744 745 -
trunk/bp-forums/bp-forums-template.php
r3982 r3983 550 550 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->groups->root_slug . '/' . $forum_template->topic->object_slug ); 551 551 else if ( !empty( $bp->is_single_item ) ) 552 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item);552 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . bp_current_item() ); 553 553 else 554 554 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_action ); … … 1101 1101 1102 1102 if ( $bp->is_single_item ) 1103 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item);1103 $permalink = trailingslashit( bp_get_root_domain() . '/' . $bp->current_component . '/' . bp_current_item() ); 1104 1104 else 1105 1105 $permalink = trailingslashit( bp_get_root_domain() . $bp->current_component . '/' . $bp->current_action ); -
trunk/bp-groups/bp-groups-screens.php
r3982 r3983 680 680 // Ask for a login if the user is coming here via an email notification 681 681 if ( !is_user_logged_in() ) 682 bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . bp_get_root_domain() . '/' . $bp->current_component . '/' . $bp->current_item. '/admin/membership-requests/' ) );682 bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . bp_get_root_domain() . '/' . $bp->current_component . '/' . bp_current_item() . '/admin/membership-requests/' ) ); 683 683 684 684 if ( !$bp->is_item_admin || 'public' == $bp->groups->current_group->status ) … … 689 689 690 690 $request_action = $bp->action_variables[1]; 691 $membership_id = $bp->action_variables[2];691 $membership_id = $bp->action_variables[2]; 692 692 693 693 if ( isset($request_action) && isset($membership_id) ) {
Note: See TracChangeset
for help on using the changeset viewer.