Skip to:
Content

BuddyPress.org

Changeset 5416


Ignore:
Timestamp:
11/29/2011 10:18:26 PM (13 years ago)
Author:
boonebgorges
Message:

Ensures links are constructed with trailing slash in forums and friends components. See #3779

Location:
trunk/bp-friends
Files:
4 edited

Legend:

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

    r5302 r5416  
    7070    switch ( $action ) {
    7171        case 'friendship_accepted':
    72             $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/newest';
     72            $link = trailingslashit( bp_loggedin_user_domain() . bp_get_friends_slug() . '/my-friends/newest' );
    7373
    7474            // Set up the string and the filter
     
    8484
    8585        case 'friendship_request':
    86             $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests?new';
     86            $link = bp_loggedin_user_domain() . bp_get_friends_slug() . '/requests/?new';
    8787
    8888            // Set up the string and the filter
  • trunk/bp-friends/bp-friends-notifications.php

    r5296 r5416  
    1616    $all_requests_link = bp_core_get_user_domain( $friend_id ) . bp_get_friends_slug() . '/requests/';
    1717    $settings_slug    = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
    18     $settings_link    = bp_core_get_user_domain( $friend_id ) .  $settings_slug . '/notifications';
     18    $settings_link    = trailingslashit( bp_core_get_user_domain( $friend_id ) .  $settings_slug . '/notifications' );
    1919    $initiator_link   = bp_core_get_user_domain( $initiator_id );
    2020
     
    6060    $friend_link   = bp_core_get_user_domain( $friend_id );
    6161    $settings_slug = function_exists( 'bp_get_settings_slug' ) ? bp_get_settings_slug() : 'settings';
    62     $settings_link = bp_core_get_user_domain( $initiator_id ) . $settings_slug . '/notifications';
     62    $settings_link = trailingslashit( bp_core_get_user_domain( $initiator_id ) . $settings_slug . '/notifications' );
    6363
    6464    // Set up and send the message
  • trunk/bp-friends/bp-friends-screens.php

    r5302 r5416  
    3030            bp_core_add_message( __( 'Friendship could not be accepted', 'buddypress' ), 'error' );
    3131
    32         bp_core_redirect( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() );
     32        bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() ) );
    3333
    3434    } elseif ( bp_is_action_variable( 'reject', 0 ) && is_numeric( bp_action_variable( 1 ) ) ) {
     
    4141            bp_core_add_message( __( 'Friendship could not be rejected', 'buddypress' ), 'error' );
    4242
    43         bp_core_redirect( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() );
     43        bp_core_redirect( trailingslashit( bp_loggedin_user_domain() . bp_current_component() . '/' . bp_current_action() ) );
    4444    }
    4545
  • trunk/bp-friends/bp-friends-template.php

    r5302 r5416  
    6060    global $bp; ?>
    6161
    62     <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/recently-active"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
    63     <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/newest"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
    64     <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>/my-friends/alphabetically"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
     62    <li<?php if ( !bp_action_variable( 0 ) || bp_is_action_variable( 'recently-active', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/recently-active' ) ?>"><?php _e( 'Recently Active', 'buddypress' ) ?></a></li>
     63    <li<?php if ( bp_is_action_variable( 'newest', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/newest' ) ?>"><?php _e( 'Newest', 'buddypress' ) ?></a></li>
     64    <li<?php if ( bp_is_action_variable( 'alphabetically', 0 ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() . '/my-friends/alphabetically' ) ?>"><?php _e( 'Alphabetically', 'buddypress' ) ?></a></li>
    6565
    6666<?php
     
    9999
    100100    <div class="info-group">
    101         <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo $bp->displayed_user->domain . bp_get_friends_slug() ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
     101        <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?>  (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( $bp->displayed_user->domain . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4>
    102102
    103103        <?php if ( $friend_ids ) { ?>
Note: See TracChangeset for help on using the changeset viewer.