Skip to:
Content

BuddyPress.org

Changeset 4145


Ignore:
Timestamp:
03/23/2011 07:01:52 PM (11 years ago)
Author:
boonebgorges
Message:

Fixes activity RSS feeds. Fixes #3121

Location:
trunk/bp-activity
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-actions.php

    r4055 r4145  
    219219function bp_activity_action_sitewide_feed() {
    220220    global $bp, $wp_query;
    221 
    222     if ( ( $bp->activity->slug != bp_current_component() ) || !bp_is_current_action( 'feed' ) || bp_is_user() || isset( $bp->groups->current_group ) )
    223         return false;
    224 
    225     $wp_query->is_404 = false;
    226     status_header( 200 );
    227 
    228     include_once( 'bp-activity/feeds/bp-activity-sitewide-feed.php' );
     221   
     222    if ( !bp_is_current_component( 'activity' ) || !bp_is_current_action( 'feed' ) || bp_is_user() || !empty( $bp->groups->current_group ) )
     223        return false;
     224
     225    $wp_query->is_404 = false;
     226    status_header( 200 );
     227
     228    include_once( 'feeds/bp-activity-sitewide-feed.php' );
    229229    die;
    230230}
     
    234234    global $bp, $wp_query;
    235235
    236     if ( ( $bp->activity->slug != bp_current_component() ) || !bp_is_user() || !bp_is_current_action( 'feed' ) )
    237         return false;
    238 
    239     $wp_query->is_404 = false;
    240     status_header( 200 );
    241 
    242     include_once( 'bp-activity/feeds/bp-activity-personal-feed.php' );
     236    if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'feed' ) )
     237        return false;
     238
     239    $wp_query->is_404 = false;
     240    status_header( 200 );
     241
     242    include_once( 'feeds/bp-activity-personal-feed.php' );
    243243    die;
    244244}
     
    248248    global $bp, $wp_query;
    249249
    250     if ( !bp_is_active( 'friends' ) || $bp->activity->slug != bp_current_component() || !bp_is_user() || !bp_is_current_action( $bp->friends->slug ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
    251         return false;
    252 
    253     $wp_query->is_404 = false;
    254     status_header( 200 );
    255 
    256     include_once( 'bp-activity/feeds/bp-activity-friends-feed.php' );
     250    if ( !bp_is_active( 'friends' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( $bp->friends->slug ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
     251        return false;
     252
     253    $wp_query->is_404 = false;
     254    status_header( 200 );
     255
     256    include_once( 'feeds/bp-activity-friends-feed.php' );
    257257    die;
    258258}
     
    262262    global $bp, $wp_query;
    263263
    264     if ( !bp_is_active( 'groups' ) || $bp->activity->slug != bp_current_component() || !bp_is_user() || !bp_is_current_action( $bp->groups->slug ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
    265         return false;
    266 
    267     $wp_query->is_404 = false;
    268     status_header( 200 );
    269 
    270     include_once( 'bp-activity/feeds/bp-activity-mygroups-feed.php' );
     264    if ( !bp_is_active( 'groups' ) || !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( $bp->groups->slug ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
     265        return false;
     266
     267    $wp_query->is_404 = false;
     268    status_header( 200 );
     269
     270    include_once( 'feeds/bp-activity-mygroups-feed.php' );
    271271    die;
    272272}
     
    276276    global $bp, $wp_query;
    277277
    278     if ( ( $bp->activity->slug != bp_current_component() ) || !bp_is_user() || !bp_is_current_action( 'mentions' ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
    279         return false;
    280 
    281     $wp_query->is_404 = false;
    282     status_header( 200 );
    283 
    284     include_once( 'bp-activity/feeds/bp-activity-mentions-feed.php' );
     278    if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'mentions' ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
     279        return false;
     280
     281    $wp_query->is_404 = false;
     282    status_header( 200 );
     283
     284    include_once( 'feeds/bp-activity-mentions-feed.php' );
    285285    die;
    286286}
     
    290290    global $bp, $wp_query;
    291291
    292     if ( ( $bp->activity->slug != bp_current_component() ) || !bp_is_user() || !bp_is_current_action( 'favorites' ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
    293         return false;
    294 
    295     $wp_query->is_404 = false;
    296     status_header( 200 );
    297 
    298     include_once( 'bp-activity/feeds/bp-activity-favorites-feed.php' );
     292    if ( !bp_is_current_component( 'activity' ) || !bp_is_user() || !bp_is_current_action( 'favorites' ) || !isset( $bp->action_variables[0] ) || $bp->action_variables[0] != 'feed' )
     293        return false;
     294
     295    $wp_query->is_404 = false;
     296    status_header( 200 );
     297
     298    include_once( 'feeds/bp-activity-favorites-feed.php' );
    299299    die;
    300300}
  • trunk/bp-activity/feeds/bp-activity-favorites-feed.php

    r3771 r4145  
    88header('Status: 200 OK');
    99?>
    10 
    1110<?php echo '<?xml version="1.0" encoding="' . get_option( 'blog_charset' ) . '"?'.'>'; ?>
    1211
Note: See TracChangeset for help on using the changeset viewer.