Skip to:
Content

BuddyPress.org

Ticket #7440: activity-error.diff

File activity-error.diff, 2.6 KB (added by espellcaste, 8 years ago)
  • src/bp-templates/bp-legacy/buddypress-functions.php

    diff --git a/src/bp-templates/bp-legacy/buddypress-functions.php b/src/bp-templates/bp-legacy/buddypress-functions.php
    index 5e7e22ca4..b4ec1481f 100644
    a b function bp_legacy_theme_ajax_querystring( $query_string, $object ) { 
    686686         */
    687687
    688688        // Activity stream filtering on action.
    689         if ( ! empty( $_BP_COOKIE['bp-' . $object . '-filter'] ) && '-1' != $_BP_COOKIE['bp-' . $object . '-filter'] ) {
    690                 $qs[] = 'type=' . $_BP_COOKIE['bp-' . $object . '-filter'];
    691 
    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'];
     689        if ( bp_is_active('activity') ) {
     690                if ( ! empty( $_BP_COOKIE['bp-' . $object . '-filter'] ) && '-1' != $_BP_COOKIE['bp-' . $object . '-filter'] ) {
     691                        $qs[] = 'type=' . $_BP_COOKIE['bp-' . $object . '-filter'];
     692
     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                }
    698700        }