Ticket #1502: topic_merge.diff
File topic_merge.diff, 1.8 KB (added by , 14 years ago) |
---|
-
bbp-includes/bbp-topic-functions.php
676 676 // Update counts, etc... 677 677 do_action( 'bbp_merge_topic', $destination_topic->ID, $source_topic->ID ); 678 678 679 // Check if the post date of the source topic is earlier than that of destination topic 680 if ( strtotime( $source_topic->post_date ) < strtotime( $destination_topic->post_date ) ) { 681 682 // If that's the case then revert back the date of the destination topic 683 // So that the topic is displayed before anything 684 $destination_post_date = date( 'Y-m-d H:i:s', strtotime( $source_topic->post_date ) - 1 ); 685 686 $postarr = array( 687 'ID' => $destination_topic_id, 688 'post_date' => $destination_post_date, 689 'post_date_gmt' => get_gmt_from_date( $destination_post_date ) 690 ); 691 692 wp_update_post( $postarr ); 693 } 694 679 695 // Remove the topic from everybody's subscriptions 680 696 $subscribers = bbp_get_topic_subscribers( $source_topic->ID ); 681 697 foreach ( (array) $subscribers as $subscriber ) { -
bbp-themes/bbp-twentyten/bbpress/form-merge.php
28 28 29 29 <div class="bbp-template-notice"> 30 30 <p><?php _e( '<strong>NOTE:</strong> All replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p> 31 <p><?php _e( 'Also note that if this topic was created before the destination topic, then the destination topic\'s post date would be changed to a second before this topic\'s date. ', 'bbpress' ); ?></p> 31 32 </div> 32 33 33 34 <div class="bbp-template-notice error">