Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/29/2011 11:06:58 PM (15 years ago)
Author:
boonebgorges
Message:

Ensures links are constructed with trailing slash in groups, members, and messages components. See #3779

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-messages/bp-messages-actions.php

    r5329 r5417  
    1818
    1919        if ( !$thread_id || !messages_is_valid_thread( $thread_id ) || ( !messages_check_thread_access( $thread_id ) && !bp_current_user_can( 'bp_moderate' ) ) )
    20                 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() );
     20                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() ) );
    2121
    2222        // Check if a new reply has been submitted
    … …  
    5353                'position'        => 40,
    5454                'user_has_access' => bp_is_my_profile(),
    55                 'link'            => bp_displayed_user_domain() . bp_get_messages_slug() . '/view/' . (int) $thread_id
     55                'link'            => trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/view/' . (int) $thread_id )
    5656        ) );
    5757
    … …  
    6969
    7070        if ( !$thread_id || !is_numeric( $thread_id ) || !messages_check_thread_access( $thread_id ) ) {
    71                 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() );
     71                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
    7272        } else {
    7373                if ( !check_admin_referer( 'messages_delete_thread' ) )
    … …  
    8080                        bp_core_add_message( __('Message deleted.', 'buddypress') );
    8181                }
    82                 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() );
     82                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
    8383        }
    8484}
    … …  
    9494
    9595        if ( !$thread_ids || !messages_check_thread_access( $thread_ids ) ) {
    96                 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() );
     96                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
    9797        } else {
    9898                if ( !check_admin_referer( 'messages_delete_thread' ) )
    … …  
    104104                        bp_core_add_message( __('Messages deleted.', 'buddypress') );
    105105
    106                 bp_core_redirect( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() );
     106                bp_core_redirect( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/' . bp_current_action() ) );
    107107        }
    108108}
Note: See TracChangeset for help on using the changeset viewer.