Changeset 4222 for trunk/bbp-includes/bbp-topic-functions.php
- Timestamp:
- 09/17/2012 12:03:03 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bbp-includes/bbp-topic-functions.php
r4218 r4222 243 243 if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) { 244 244 $topic_status = bbp_get_pending_status_id(); 245 246 // Maybe set as bozo status247 } elseif ( bbp_is_user_bozo() ) {248 $topic_status = bbp_get_bozo_status_id();249 245 250 246 // Default to published … … 438 434 439 435 // Define local variable(s) 440 $topic = $topic_id = $ forum_id = $anonymous_data = 0;436 $topic = $topic_id = $topic_author = $forum_id = $anonymous_data = 0; 441 437 $topic_title = $topic_content = $topic_edit_reason = ''; 442 438 … … 463 459 464 460 // Check users ability to create new topic 465 if ( ! bbp_is_topic_anonymous( $topic_id ) ) {461 if ( ! bbp_is_topic_anonymous( $topic_id ) ) { 466 462 467 463 // User cannot edit this topic … … 470 466 } 471 467 468 // Set topic author 469 $topic_author = bbp_get_topic_author_id( $topic_id ); 470 472 471 // It is an anonymous post 473 472 } else { … … 550 549 /** Topic Blacklist *******************************************************/ 551 550 552 if ( !bbp_check_for_blacklist( $anonymous_data, bbp_get_topic_author_id( $topic_id ), $topic_title, $topic_content ) )551 if ( !bbp_check_for_blacklist( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) 553 552 bbp_add_error( 'bbp_topic_blacklist', __( '<strong>ERROR</strong>: Your topic cannot be edited at this time.', 'bbpress' ) ); 554 553 … … 558 557 if ( !bbp_check_for_moderation( $anonymous_data, $topic_author, $topic_title, $topic_content ) ) { 559 558 $topic_status = bbp_get_pending_status_id(); 560 561 // Maybe set as bozo status562 } elseif ( bbp_is_user_bozo() ) {563 $topic_status = bbp_get_bozo_status_id();564 559 565 560 // Default to published … … 610 605 'post_status' => $topic_status, 611 606 'post_parent' => $forum_id, 612 'post_author' => $topic ->post_author,607 'post_author' => $topic_author, 613 608 'post_type' => bbp_get_topic_post_type(), 614 609 'tax_input' => $terms, … … 664 659 665 660 // Update counts, etc... 666 do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic ->post_author , true /* Is edit */ );661 do_action( 'bbp_edit_topic', $topic_id, $forum_id, $anonymous_data, $topic_author , true /* Is edit */ ); 667 662 668 663 // If the new forum id is not equal to the old forum id, run the
Note: See TracChangeset
for help on using the changeset viewer.