Skip to:
Content

BuddyPress.org

Changeset 5818


Ignore:
Timestamp:
02/21/2012 02:22:22 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove trailing spaces from bp-core-catchuri.php.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-core/bp-core-catchuri.php

    r5817 r5818  
    7676    // If running off blog other than root, any subdirectory names must be
    7777    // removed from $bp_uri. This includes two cases:
    78     // 
     78    //
    7979    //    1. when WP is installed in a subdirectory,
    8080    //    2. when BP is running on secondary blog of a subdirectory
     
    123123        }
    124124    }
    125    
     125
    126126    // Reset the keys by merging with an empty array
    127127    $bp_uri = array_merge( array(), $bp_uri );
     
    317317/**
    318318 * Are root profiles enabled and allowed
    319  * 
     319 *
    320320 * @since BuddyPress (1.6)
    321321 * @return bool True if yes, false if no
    322322 */
    323323function bp_core_enable_root_profiles() {
    324    
     324
    325325    $retval = false;
    326326
    327327    if ( defined( 'BP_ENABLE_ROOT_PROFILES' ) && ( true == BP_ENABLE_ROOT_PROFILES ) )
    328328        $retval = true;
    329    
     329
    330330    return apply_filters( 'bp_core_enable_root_profiles', $retval );
    331331}
     
    355355        }
    356356    }
    357        
     357
    358358    // Set the root object as the current wp_query-ied item
    359359    $object_id = 0;
     
    370370        $post                        = $wp_query->queried_object;
    371371    }
    372    
     372
    373373    // Define local variables
    374374    $located_template   = false;
     
    391391
    392392        load_template( apply_filters( 'bp_load_template', $located_template ) );
    393    
     393
    394394        do_action( 'bp_core_post_load_template', $located_template );
    395395    }
     
    442442function bp_core_no_access( $args = '' ) {
    443443
    444     // Build the redirect URL 
     444    // Build the redirect URL
    445445    $redirect_url  = is_ssl() ? 'https://' : 'http://';
    446446    $redirect_url .= $_SERVER['HTTP_HOST'];
     
    530530function bp_redirect_canonical() {
    531531    global $bp;
    532    
     532
    533533    if ( !bp_is_blog_page() && apply_filters( 'bp_do_redirect_canonical', true ) ) {
    534534        // If this is a POST request, don't do a canonical redirect.
     
    539539            return;
    540540        }
    541        
     541
    542542        // build the URL in the address bar
    543543        $requested_url  = is_ssl() ? 'https://' : 'http://';
    544544        $requested_url .= $_SERVER['HTTP_HOST'];
    545545        $requested_url .= $_SERVER['REQUEST_URI'];
    546        
     546
    547547        // Stash query args
    548548        $url_stack      = explode( '?', $requested_url );
    549549        $req_url_clean  = $url_stack[0];
    550        
     550
    551551        // Process the redirect stack
    552552        if ( isset( $bp->redirect_stack['base_url'] ) ) {
    553553            $url_stack[0] = $bp->redirect_stack['base_url'];
    554554        }
    555                
     555
    556556        if ( isset( $bp->redirect_stack['component'] ) ) {
    557557            $url_stack[0] = trailingslashit( $url_stack[0] . $bp->redirect_stack['component'] );
    558558        }
    559                
     559
    560560        if ( isset( $bp->redirect_stack['action'] ) ) {
    561561            $url_stack[0] = trailingslashit( $url_stack[0] . $bp->redirect_stack['action'] );
    562562        }
    563                    
     563
    564564        if ( !empty( $bp->redirect_stack['action_variables'] ) ) {
    565565            foreach( (array) $bp->redirect_stack['action_variables'] as $av ) {
    566                 $url_stack[0] = trailingslashit( $url_stack[0] . $av ); 
     566                $url_stack[0] = trailingslashit( $url_stack[0] . $av );
    567567            }
    568568        }
    569        
     569
    570570        // Add trailing slash
    571571        $url_stack[0] = trailingslashit( $url_stack[0] );
    572        
     572
    573573        // Only redirect if we've assembled a URL different from the request
    574574        if ( $url_stack[0] !== $req_url_clean ) {
    575            
     575
    576576            // Template messages have been deleted from the cookie by this point, so
    577577            // they must be readded before redirecting
     
    579579                $message      = stripslashes( $bp->template_message );
    580580                $message_type = isset( $bp->template_message_type ) ? $bp->template_message_type : 'success';
    581                
     581
    582582                bp_core_add_message( $message, $message_type );
    583583            }
    584            
     584
    585585            bp_core_redirect( implode( '?', $url_stack ) );
    586586        }
     
    598598 *
    599599 * @since BuddyPress (1.6)
    600  * @uses bp_is_blog_page() 
     600 * @uses bp_is_blog_page()
    601601 */
    602602function _bp_maybe_remove_redirect_canonical() {
Note: See TracChangeset for help on using the changeset viewer.