Skip to:
Content

BuddyPress.org

Changeset 4038


Ignore:
Timestamp:
02/12/2011 06:31:59 PM (13 years ago)
Author:
djpaul
Message:

Fix PHP warning in the activity loader backend.

File:
1 edited

Legend:

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

    r3982 r4038  
    9999    global $bp;
    100100
     101    $scope = '';
     102    if ( !empty( $_POST['scope'] ) )
     103        $scope = $_POST['scope'];
     104
    101105    // We need to calculate and return the feed URL for each scope
    102     $feed_url = home_url( bp_get_activity_root_slug() . '/feed/' );
    103 
    104     switch ( $_POST['scope'] ) {
     106    switch ( $scope ) {
    105107        case 'friends':
    106108            $feed_url = $bp->loggedin_user->domain . bp_get_activity_slug() . '/friends/feed/';
     
    116118            delete_user_meta( $bp->loggedin_user->id, 'bp_new_mention_count' );
    117119            break;
     120        default:
     121            $feed_url = home_url( bp_get_activity_root_slug() . '/feed/' );
     122            break;
    118123    }
    119124
     
    122127    locate_template( array( 'activity/activity-loop.php' ), true );
    123128    $result['contents'] = ob_get_contents();
    124     $result['feed_url'] = apply_filters( 'bp_dtheme_activity_feed_url', $feed_url, $_POST['scope'] );
     129    $result['feed_url'] = apply_filters( 'bp_dtheme_activity_feed_url', $feed_url, $scope );
    125130    ob_end_clean();
    126131
Note: See TracChangeset for help on using the changeset viewer.