Skip to:
Content

Changeset 11643


Ignore:
Timestamp:
07/13/17 19:10:44 (2 months ago)
Author:
boonebgorges
Message:

Ensure that links for managing sitewide notices are specific to logged-in user.

These links were incorrectly converted to the displayed user as
part of the work in [11578]. Notices are always relative to the
logged-in user, and can be displayed anywhere on a site - regardless
of the displayed user (or lack thereof).

See #7096.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-messages/bp-messages-template.php

    r11612 r11643  
    11641164         * @param string $value Text indicating action being executed. 
    11651165         */ 
    1166         return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id ), 'messages_delete_thread' ) ); 
     1166        return apply_filters( 'bp_get_message_notice_delete_link', wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/delete/' . $messages_template->thread->id ), 'messages_delete_thread' ) ); 
    11671167    } 
    11681168 
     
    11821182 
    11831183        if ( 1 === (int) $messages_template->thread->is_active ) { 
    1184             $link = wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' ); 
     1184            $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/deactivate/' . $messages_template->thread->id ), 'messages_deactivate_notice' ); 
    11851185        } else { 
    1186             $link = wp_nonce_url( trailingslashit( bp_displayed_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' ); 
     1186            $link = wp_nonce_url( trailingslashit( bp_loggedin_user_domain() . bp_get_messages_slug() . '/notices/activate/' . $messages_template->thread->id ), 'messages_activate_notice' ); 
    11871187        } 
    11881188 
Note: See TracChangeset for help on using the changeset viewer.