Changeset 1067
- Timestamp:
- 02/12/2009 02:18:42 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
bp-activity/bp-activity-classes.php (modified) (2 diffs)
-
bp-blogs.php (modified) (5 diffs)
-
bp-core.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity/bp-activity-classes.php
r1062 r1067 100 100 $cached_component_action_sql = $wpdb->prepare( "AND component_action = %s", $component_action ); 101 101 } 102 103 error_log( $component_action ); 104 105 error_log( $wpdb->prepare( "DELETE FROM {$wpdb->base_prefix}user_{$user_id}_activity WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) ); 106 error_log( $wpdb->prepare( "DELETE FROM {$wpdb->base_prefix}user_{$user_id}_activity_cached WHERE item_id = %d {$secondary_sql} AND component_name = %s {$cached_component_action_sql}", $item_id, $component_name ) ); 107 error_log( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_sitewide} WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) ); 108 102 109 103 $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->base_prefix}user_{$user_id}_activity WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) ); 110 104 … … 112 106 $wpdb->query( $wpdb->prepare( "DELETE FROM {$wpdb->base_prefix}user_{$user_id}_activity_cached WHERE item_id = %d {$secondary_sql} AND component_name = %s {$cached_component_action_sql}", $item_id, $component_name ) ); 113 107 $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->activity->table_name_sitewide} WHERE item_id = %d {$secondary_sql} AND component_name = %s {$component_action_sql}", $item_id, $component_name ) ); 114 108 115 109 return true; 116 110 } -
trunk/bp-blogs.php
r1052 r1067 8 8 9 9 /* These will be moved into admin configurable settings */ 10 define ( 'TOTAL_RECORDED_POSTS', 1 0 );11 define ( 'TOTAL_RECORDED_COMMENTS', 25);10 define ( 'TOTAL_RECORDED_POSTS', 150 ); 11 define ( 'TOTAL_RECORDED_COMMENTS', 500 ); 12 12 13 13 include_once( 'bp-blogs/bp-blogs-classes.php' ); … … 410 410 411 411 if ( !$is_recorded = BP_Blogs_Post::is_recorded( $post_id, $blog_id, $user_id ) ) { 412 if ( 'publish' == $post->post_status ) {412 if ( 'publish' == $post->post_status && '' == $post->post_password ) { 413 413 414 414 /** … … 442 442 * - The post is password protected 443 443 */ 444 if ( $post->post_status != 'publish' || $post->post_password != '')444 if ( 'publish' != $post->post_status || '' != $post->post_password ) 445 445 bp_blogs_remove_post( $post_id, $blog_id ); 446 446 … … 606 606 // Delete post from the bp_blogs table 607 607 BP_Blogs_Post::delete( $post_id, $blog_id ); 608 608 609 609 // Delete activity stream item 610 bp_blogs_delete_activity( array( 'item_id' => $post-> id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'user_id' => $post->user_id ) );610 bp_blogs_delete_activity( array( 'item_id' => $post->blog_id, 'secondary_item_id' => $post->id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'user_id' => $post->user_id ) ); 611 611 612 612 do_action( 'bp_blogs_remove_post', $blog_id, $post_id ); … … 628 628 629 629 // Delete activity stream item 630 bp_blogs_delete_activity( array( 'item_id' => $ comment_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_comment', 'user_id' => $bp->loggedin_user->id ) );630 bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'secondary_item_id' => $comment_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_comment', 'user_id' => $bp->loggedin_user->id ) ); 631 631 632 632 do_action( 'bp_blogs_remove_comment', $blog_id, $comment_id ); -
trunk/bp-core.php
r1063 r1067 982 982 return false; 983 983 984 if ( time() >= strtotime( '+5 minutes', get_usermeta( $bp->loggedin_user->id, 'last_activity' ) ) || '' == get_usermeta( $bp->loggedin_user->id, 'last_activity' ) ) { 985 // Updated last site activity for this user. 984 if ( '' == get_usermeta( $bp->loggedin_user->id, 'last_activity' ) ) 985 update_usermeta( $bp->loggedin_user->id, 'last_activity', time() ); 986 987 if ( time() >= strtotime( '+5 minutes', get_usermeta( $bp->loggedin_user->id, 'last_activity' ) ) ) 986 988 update_usermeta( $bp->loggedin_user->id, 'last_activity', time() ); 987 }988 989 } 989 990 add_action( 'wp_head', 'bp_core_record_activity' );
Note: See TracChangeset
for help on using the changeset viewer.