Skip to:
Content

BuddyPress.org

Changeset 2593


Ignore:
Timestamp:
02/04/2010 04:03:16 PM (14 years ago)
Author:
apeatling
Message:

Fixing activity scope bugs.

Location:
trunk/bp-themes/bp-default/_inc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-themes/bp-default/_inc/ajax.php

    r2592 r2593  
    4444            $qs[] = 'user_id=' . $user_id;
    4545        }
    46         if ( 'all' != $_BP_COOKIE['bp-' . $object . '-scope'] )
    47             $qs[] = 'scope=' . $_BP_COOKIE['bp-' . $object . '-scope']; // Activity stream scope
    48 
     46        if ( 'all' != $_BP_COOKIE['bp-' . $object . '-scope'] && empty( $bp->displayed_user->id ) )
     47            $qs[] = 'scope=' . $_BP_COOKIE['bp-' . $object . '-scope']; // Activity stream scope on activity directory.
    4948    }
    5049
  • trunk/bp-themes/bp-default/_inc/global.js

    r2586 r2593  
    10181018    /* Clear BP cookies on logout */
    10191019    j('a.logout').click( function() {
    1020         j.cookie('bp-activity-scope', null);
    1021         j.cookie('bp-activity-filter', null);
     1020        j.cookie('bp-activity-scope', null, {path: '/'});
     1021        j.cookie('bp-activity-filter', null, {path: '/'});
    10221022        j.cookie('bp-activity-oldestpage', null, {path: '/'});
    10231023
     
    10281028            j.cookie('bp-' + objects[i] + '-extras', null, {path: '/'} );
    10291029        });
     1030    });
     1031
     1032    /* On page unload, clear the activity scope. */
     1033    j(window).unload( function() {
     1034        j.cookie('bp-activity-scope', null, {path: '/'});
    10301035    });
    10311036});
     
    11161121function bp_activity_request(scope, filter) {
    11171122    /* Save the type and filter to a session cookie */
    1118     j.cookie( 'bp-activity-scope', scope );
    1119     j.cookie( 'bp-activity-filter', filter );
     1123    j.cookie( 'bp-activity-scope', scope, {path: '/'} );
     1124    j.cookie( 'bp-activity-filter', filter, {path: '/'} );
    11201125    j.cookie( 'bp-activity-oldestpage', 1 );
    11211126
Note: See TracChangeset for help on using the changeset viewer.