Changeset 5320
- Timestamp:
- 11/09/2011 06:54:53 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
bp-core/bp-core-catchuri.php (modified) (5 diffs)
-
bp-core/bp-core-functions.php (modified) (1 diff)
-
bp-loader.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-catchuri.php
r5319 r5320 400 400 */ 401 401 function bp_core_catch_profile_uri() { 402 global $bp; 403 404 if ( !bp_is_active( 'xprofile' ) ) 402 if ( !bp_is_active( 'xprofile' ) ) { 405 403 bp_core_load_template( apply_filters( 'bp_core_template_display_profile', 'members/single/home' ) ); 404 } 406 405 } 407 406 … … 413 412 */ 414 413 function bp_core_catch_no_access() { 415 global $bp, $ bp_no_status_set, $wp_query;416 417 // If bp_core_redirect() and $bp_no_status_set is true,418 // we are redirecting to an accessible page ,so skip this check.419 if ( $bp_no_status_set)414 global $bp, $wp_query; 415 416 // If coming from bp_core_redirect() and $bp_no_status_set is true, 417 // we are redirecting to an accessible page so skip this check. 418 if ( !empty( $bp->no_status_set ) ) 420 419 return false; 421 420 … … 435 434 */ 436 435 function bp_core_no_access( $args = '' ) { 437 global $bp;438 436 439 437 $defaults = array( … … 441 439 'message' => __( 'You must log in to access the page you requested.', 'buddypress' ), 442 440 'redirect' => wp_guess_url(), // the URL you get redirected to when a user successfully logs in 443 'root' => $bp->root_domain// the landing page you get redirected to when a user doesn't have access441 'root' => bp_get_root_domain() // the landing page you get redirected to when a user doesn't have access 444 442 ); 445 443 446 444 $r = wp_parse_args( $args, $defaults ); 445 $r = apply_filters_ref_array( 'bp_core_no_access', $r ); 447 446 extract( $r, EXTR_SKIP ); 448 447 449 // Apply filters to these variables 448 /** 449 * @ignore Ignore these filters and use 'bp_core_no_access' above 450 */ 450 451 $mode = apply_filters( 'bp_no_access_mode', $mode, $root, $redirect, $message ); 451 452 $redirect = apply_filters( 'bp_no_access_redirect', $redirect, $root, $message, $mode ); … … 470 471 case 1 : 471 472 default : 472 if ( $redirect ) { 473 474 $url = $root; 475 if ( !empty( $redirect ) ) 473 476 $url = add_query_arg( 'redirect_to', urlencode( $redirect ), $root ); 474 } else { 475 $url = $root; 476 } 477 478 if ( $message ) { 477 478 if ( !empty( $message ) ) { 479 479 bp_core_add_message( $message, 'error' ); 480 480 } -
trunk/bp-core/bp-core-functions.php
r5309 r5320 831 831 * 832 832 * @package BuddyPress Core 833 * @global $bp_no_status_set Makes sure that there are no conflicts with status_header() called in bp_core_do_catch_uri()834 * @uses get_themes()835 * @ return An array containing all of the themes.833 * @global BuddyPress $bp Makes sure that there are no conflicts with 834 * status_header() called in bp_core_do_catch_uri() 835 * @uses wp_redirect() 836 836 */ 837 837 function bp_core_redirect( $location, $status = 302 ) { 838 global $bp _no_status_set;838 global $bp; 839 839 840 840 // Make sure we don't call status_header() in bp_core_do_catch_uri() 841 841 // as this conflicts with wp_redirect() 842 $bp _no_status_set = true;842 $bp->no_status_set = true; 843 843 844 844 wp_redirect( $location, $status ); -
trunk/bp-loader.php
r5317 r5320 155 155 */ 156 156 public $unfiltered_uri_offset = 0; 157 157 158 /** 159 * @var bool Are status headers already sent? 160 */ 161 public $no_status_set = false; 162 158 163 /** Components ************************************************************/ 159 164
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)