Changeset 1048 for trunk/bp-blogs.php
- Timestamp:
- 02/10/2009 08:50:05 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r1032 r1048 268 268 break; 269 269 case 'new_blog_post': 270 $post = new BP_Blogs_Post($ item_id);270 $post = new BP_Blogs_Post($secondary_item_id); 271 271 272 272 if ( !$post ) … … 296 296 return false; 297 297 298 $comment = new BP_Blogs_Comment($ item_id);298 $comment = new BP_Blogs_Comment($secondary_item_id); 299 299 300 300 if ( !$comment ) … … 432 432 433 433 // Record in activity streams 434 bp_blogs_record_activity( array( 'item_id' => $recorded_post _id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'is_private' => $is_private, 'user_id' => $recorded_post->user_id ) );434 bp_blogs_record_activity( array( 'item_id' => $recorded_post->blog_id, 'secondary_item_id' => $recorded_post_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_post', 'is_private' => $is_private, 'user_id' => $recorded_post->user_id ) ); 435 435 } 436 436 } else { … … 508 508 509 509 // Record in activity streams 510 bp_blogs_record_activity( array( 'item_id' => $recorded_comm ment_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_comment', 'is_private' => $is_private, 'user_id' => $recorded_comment->user_id ) );510 bp_blogs_record_activity( array( 'item_id' => $recorded_comment->blog_id, 'secondary_item_id' => $recorded_commment_id, 'component_name' => 'blogs', 'component_action' => 'new_blog_comment', 'is_private' => $is_private, 'user_id' => $recorded_comment->user_id ) ); 511 511 } 512 512 } else { … … 635 635 636 636 function bp_blogs_remove_data_for_blog( $blog_id ) { 637 global $bp; 638 637 639 /* If this is regular blog, delete all data for that blog. */ 638 640 BP_Blogs_Blog::delete_blog_for_all( $blog_id ); 639 641 BP_Blogs_Post::delete_posts_for_blog( $blog_id ); 640 642 BP_Blogs_Comment::delete_comments_for_blog( $blog_id ); 643 644 // Delete activity stream item 645 bp_blogs_delete_activity( array( 'item_id' => $blog_id, 'component_name' => 'blogs', 'component_action' => false, 'user_id' => $bp->loggedin_user->id ) ); 641 646 642 647 do_action( 'bp_blogs_remove_data_for_blog', $blog_id ); … … 722 727 723 728 if ( !$meta_key ) { 724 $wpdb->query( $wpdb->prepare( "DELETE FROM " . $bp->blogs->table_name_blogpmeta . "WHERE blog_id = %d", $blog_id ) );729 $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d", $blog_id ) ); 725 730 } else if ( !$meta_value ) { 726 731 $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->blogs->table_name_blogmeta} WHERE blog_id = %d AND meta_key = %s AND meta_value = %s", $blog_id, $meta_key, $meta_value ) );
Note: See TracChangeset
for help on using the changeset viewer.