Skip to:
Content

BuddyPress.org

Changeset 1062


Ignore:
Timestamp:
02/11/2009 08:08:26 PM (16 years ago)
Author:
apeatling
Message:

Fixes #340

Location:
trunk
Files:
5 edited

Legend:

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

    r1052 r1062  
    4646        global $wpdb, $bp, $current_user;
    4747
    48         if ( !$this->item_id || !$this->user_id || $this->is_private )
     48        if ( !$this->item_id || !$this->user_id || $this->is_private || !$this->component_name )
    4949            return false;
    5050           
     
    161161            $activities = $wpdb->get_results( $wpdb->prepare( "SELECT * FROM {$bp->activity->table_name_current_user} WHERE date_recorded >= FROM_UNIXTIME(%d) $privacy_sql ORDER BY date_recorded DESC LIMIT 30", $since ) );
    162162
    163             for ( $i = 0; $i < count( $activities ); $i++ ) {           
     163            for ( $i = 0; $i < count( $activities ); $i++ ) {
     164               
     165                if ( !$activities[$i]->component_name ) continue;
     166                       
    164167                if ( function_exists( $bp->{$activities[$i]->component_name}->format_activity_function ) ) {   
    165168                    if ( !$content = call_user_func( $bp->{$activities[$i]->component_name}->format_activity_function, $activities[$i]->item_id, $activities[$i]->user_id, $activities[$i]->component_action, $activities[$i]->secondary_item_id ) )
  • trunk/bp-core.php

    r1061 r1062  
    12971297
    12981298/**
    1299  * bp_core_ucfirst()
     1299 * bp_core_strip_username_spaces()
    13001300 *
    13011301 * Strips spaces from usernames that are created using add_user() and wp_insert_user()
  • trunk/bp-wire.php

    r1052 r1062  
    128128    $wire_post = new BP_Wire_Post( $table_name, $wire_post_id );
    129129   
    130     if ( !$bp->is_item_admin ) {
    131         if ( $wire_post->user_id != $bp->loggedin_user->id )
    132             return false;
     130    if ( !is_site_admin() ) {
     131        if ( !$bp->is_item_admin ) {
     132            if ( $wire_post->user_id != $bp->loggedin_user->id )
     133                return false;
     134        }
    133135    }
    134136   
  • trunk/bp-wire/bp-wire-templatetags.php

    r1052 r1062  
    302302        $uri = $bp->current_item;
    303303       
    304     if ( ( $wire_posts_template->wire_post->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin ) {
     304    if ( ( $wire_posts_template->wire_post->user_id == $bp->loggedin_user->id ) || $bp->is_item_admin || is_site_admin() ) {
    305305        if ( $bp->wire->slug == $bp->current_component || $bp->profile->slug == $bp->current_component ) {
    306306            echo apply_filters( 'bp_wire_delete_link', '<a href="' . wp_nonce_url( $bp->displayed_user->domain . $bp->wire->slug . '/delete/' . $wire_posts_template->wire_post->id, 'bp_wire_delete_link' ) . '">[' . __('Delete', 'buddypress') . ']</a>' );
  • trunk/bp-xprofile.php

    r1052 r1062  
    419419   
    420420    if ( $bp->current_action != 'delete' )
     421        return false;
     422   
     423    if ( !check_admin_referer( 'bp_wire_delete_link' ) )
    421424        return false;
    422425           
Note: See TracChangeset for help on using the changeset viewer.