Skip to:
Content

BuddyPress.org

Changeset 11421


Ignore:
Timestamp:
02/08/2017 08:30:06 PM (5 years ago)
Author:
boonebgorges
Message:

When parsing directory AJAX querystring, don't skip 'type' param when Activity is disabled.

Introduced in [11419].

Props r-a-y.
See #7440.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r11419 r11421  
    687687
    688688    // Activity stream filtering on action.
    689     if ( bp_is_active( 'activity' ) && ! empty( $_BP_COOKIE['bp-' . $object . '-filter'] ) && '-1' != $_BP_COOKIE['bp-' . $object . '-filter'] ) {
     689    if ( ! empty( $_BP_COOKIE['bp-' . $object . '-filter'] ) && '-1' != $_BP_COOKIE['bp-' . $object . '-filter'] ) {
    690690        $qs[] = 'type=' . $_BP_COOKIE['bp-' . $object . '-filter'];
    691691
    692         $actions = bp_activity_get_actions_for_context();
    693         foreach ( $actions as $action ) {
    694             if ( $action['key'] === $_BP_COOKIE['bp-' . $object . '-filter'] ) {
    695                 $qs[] = 'action=' . $_BP_COOKIE['bp-' . $object . '-filter'];
     692        if ( bp_is_active( 'activity' ) ) {
     693            $actions = bp_activity_get_actions_for_context();
     694            foreach ( $actions as $action ) {
     695                if ( $action['key'] === $_BP_COOKIE['bp-' . $object . '-filter'] ) {
     696                    $qs[] = 'action=' . $_BP_COOKIE['bp-' . $object . '-filter'];
     697                }
    696698            }
    697699        }
Note: See TracChangeset for help on using the changeset viewer.