Changeset 4222 for trunk/bbp-includes/bbp-reply-functions.php
- Timestamp:
- 09/17/2012 12:03:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbp-includes/bbp-reply-functions.php
r4218 r4222 221 221 if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) { 222 222 $reply_status = bbp_get_pending_status_id(); 223 224 // Maybe set as bozo status225 } elseif ( bbp_is_user_bozo() ) {226 $reply_status = bbp_get_bozo_status_id();227 223 228 224 // Default … … 391 387 392 388 // Define local variable(s) 393 $reply = $reply_id = $ topic_id = $forum_id = $anonymous_data = 0;389 $reply = $reply_id = $reply_author = $topic_id = $forum_id = $anonymous_data = 0; 394 390 $reply_title = $reply_content = $reply_edit_reason = $terms = ''; 395 391 … … 422 418 423 419 // Check users ability to create new reply 424 if ( ! bbp_is_reply_anonymous( $reply_id ) ) {420 if ( ! bbp_is_reply_anonymous( $reply_id ) ) { 425 421 426 422 // User cannot edit this reply … … 430 426 } 431 427 428 // Set reply author 429 $reply_author = bbp_get_reply_author_id( $reply_id ); 430 432 431 // It is an anonymous post 433 432 } else { … … 494 493 /** Reply Blacklist *******************************************************/ 495 494 496 if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_reply_author_id( $reply_id ), $reply_title, $reply_content ) )495 if ( !bbp_check_for_blacklist( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) 497 496 bbp_add_error( 'bbp_reply_blacklist', __( '<strong>ERROR</strong>: Your reply cannot be edited at this time.', 'bbpress' ) ); 498 497 … … 500 499 501 500 // Maybe put into moderation 502 if ( !bbp_check_for_moderation( $anonymous_data, bbp_get_reply_author_id( $reply_id ), $reply_title, $reply_content ) ) {501 if ( !bbp_check_for_moderation( $anonymous_data, $reply_author, $reply_title, $reply_content ) ) { 503 502 $reply_status = bbp_get_pending_status_id(); 504 505 // Maybe set as bozo status506 } elseif ( bbp_is_user_bozo() ) {507 $reply_status = bbp_get_bozo_status_id();508 503 509 504 // Default … … 544 539 'post_content' => $reply_content, 545 540 'post_status' => $reply_status, 546 'post_parent' => $ reply->post_parent,547 'post_author' => $reply ->post_author,541 'post_parent' => $topic_id, 542 'post_author' => $reply_author, 548 543 'post_type' => bbp_get_reply_post_type() 549 544 ) ); … … 589 584 590 585 // Update counts, etc... 591 do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply ->post_author , true /* Is edit */ );586 do_action( 'bbp_edit_reply', $reply_id, $topic_id, $forum_id, $anonymous_data, $reply_author , true /* Is edit */ ); 592 587 593 588 /** Additional Actions (After Save) ***********************************/
Note: See TracChangeset
for help on using the changeset viewer.