Changeset 843
- Timestamp:
- 01/13/2009 10:59:17 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-blogs.php
r836 r843 365 365 add_action( 'wpmu_new_blog', 'bp_blogs_record_blog', 10, 2 ); 366 366 367 function bp_blogs_record_post( $post_id) {367 function bp_blogs_record_post( $post_id, $blog_id = false, $user_id = false ) { 368 368 global $bp, $current_blog; 369 369 … … 374 374 375 375 $post_id = (int)$post_id; 376 $user_id = (int)$bp['loggedin_userid']; 377 $blog_id = (int)$current_blog->blog_id; 376 377 if ( !$user_id ) 378 $user_id = (int)$bp['loggedin_userid']; 379 380 if ( !$blog_id ) 381 $blog_id = (int)$current_blog->blog_id; 378 382 379 383 /* This is to stop infinate loops with Donncha's sitewide tags plugin */ … … 431 435 add_action( 'publish_post', 'bp_blogs_record_post' ); 432 436 433 function bp_blogs_record_comment( $comment_id, $ from_ajax = false ) {437 function bp_blogs_record_comment( $comment_id, $post_id = false, $blog_id = false, $from_ajax = false ) { 434 438 global $bp, $current_blog, $current_user; 435 439 … … 448 452 if ( $user_id ) { 449 453 $comment_id = (int)$comment_id; 450 $blog_id = (int)$current_blog->blog_id; 451 $post_id = (int)$comment->comment_post_ID; 452 454 455 if ( !$post_id ) 456 $post_id = (int)$comment->comment_post_ID; 457 458 if ( !$blog_id ) 459 $blog_id = (int)$current_blog->blog_id; 460 453 461 /** 454 462 * Check how many recorded posts there are for the user. If we are … … 518 526 bp_blogs_remove_comment( $comment_id ); 519 527 } else { 520 bp_blogs_record_comment( $comment_id, true );528 bp_blogs_record_comment( $comment_id, false, false, true ); 521 529 } 522 530 }
Note: See TracChangeset
for help on using the changeset viewer.