Skip to:
Content

BuddyPress.org

Changeset 7260


Ignore:
Timestamp:
07/10/2013 07:53:31 AM (11 years ago)
Author:
djpaul
Message:

Port r7254 from 1.7 branch to trunk - setcookie tweaks

"Only delete the bp-message and bp-message-type cookies when they are currently set. Otherwise, Set-Cookie headers are always issued, which messes with caching proxies."

File:
1 edited

Legend:

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

    r7256 r7260  
    780780    add_action( 'template_notices', 'bp_core_render_message' );
    781781
    782     @setcookie( 'bp-message',      false, time() - 1000, COOKIEPATH );
    783     @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
     782    if ( isset( $_COOKIE['bp-message'] ) )
     783        @setcookie( 'bp-message', false, time() - 1000, COOKIEPATH );
     784    if ( isset( $_COOKIE['bp-message-type'] ) )
     785        @setcookie( 'bp-message-type', false, time() - 1000, COOKIEPATH );
    784786}
    785787add_action( 'bp_actions', 'bp_core_setup_message', 5 );
Note: See TracChangeset for help on using the changeset viewer.