Ticket #3099: 3099.01.patch
File 3099.01.patch, 1.9 KB (added by , 13 years ago) |
---|
-
bp-activity/bp-activity-classes.php
457 457 458 458 // array of prepared integers or quoted strings 459 459 $items_prepared = array(); 460 460 461 461 // clean up and format each item 462 462 foreach ( $items_dirty as $item ) { 463 463 // clean up the string … … 537 537 global $wpdb, $bp; 538 538 539 539 return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 1 WHERE user_id = %d", $user_id ) ); 540 } 541 542 function show_all_for_user( $user_id ) { 543 global $wpdb, $bp; 544 545 return $wpdb->get_var( $wpdb->prepare( "UPDATE {$bp->activity->table_name} SET hide_sitewide = 0 WHERE user_id = %d", $user_id ) ); 540 546 } 541 547 } 542 548 -
bp-activity/bp-activity-functions.php
856 856 return BP_Activity_Activity::hide_all_for_user( $user_id ); 857 857 } 858 858 859 function bp_activity_show_user_activity( $user_id ) { 860 return BP_Activity_Activity::show_all_for_user( $user_id ); 861 } 862 859 863 /** 860 864 * bp_activity_thumbnail_content_images() 861 865 * -
bp-members/bp-members-actions.php
70 70 else 71 71 bp_core_add_message( __( 'User removed as spammer.', 'buddypress' ) ); 72 72 73 // Hide this user's activity 74 if ( $is_spam && function_exists( 'bp_activity_hide_user_activity' ) ) 75 bp_activity_hide_user_activity( $bp->displayed_user->id ); 73 // Toggle visibility of activity items depending on spam status 74 if ( bp_is_active( 'activity' ) ) { 75 if ( $is_spam ) 76 bp_activity_hide_user_activity( $bp->displayed_user->id ); 77 else 78 bp_activity_show_user_activity( $bp->displayed_user->id ); 79 } 76 80 77 81 // We need a special hook for is_spam so that components can 78 82 // delete data at spam time