Changeset 5489
- Timestamp:
- 09/10/2014 10:52:46 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/includes/topics/functions.php
r5466 r5489 1221 1221 1222 1222 // Check if the destination topic is older than the source topic 1223 if ( strtotime( $ destination_topic->post_date ) < strtotime( $source_topic->post_date ) ) {1223 if ( strtotime( $source_topic->post_date ) < strtotime( $destination_topic->post_date ) ) { 1224 1224 1225 1225 // Set destination topic post_date to 1 second before source topic … … 1300 1300 // Sticky 1301 1301 bbp_unstick_topic( $source_topic->ID ); 1302 1303 // Delete source topic's last & count meta data 1304 delete_post_meta( $source_topic->ID, '_bbp_last_reply_id' ); 1305 delete_post_meta( $source_topic->ID, '_bbp_last_active_id' ); 1306 delete_post_meta( $source_topic->ID, '_bbp_last_active_time' ); 1307 delete_post_meta( $source_topic->ID, '_bbp_voice_count' ); 1308 delete_post_meta( $source_topic->ID, '_bbp_reply_count' ); 1309 delete_post_meta( $source_topic->ID, '_bbp_reply_count_hidden' ); 1302 1310 1303 1311 // Get the replies of the source topic … … 1326 1334 'post_type' => bbp_get_reply_post_type(), 1327 1335 'post_parent' => $destination_topic->ID, 1328 'menu_order' => bbp_get_reply_position_raw( $reply->ID, $destination_topic->ID ),1329 1336 'guid' => '' 1330 1337 ) ); … … 1334 1341 bbp_update_reply_forum_id( $reply->ID, bbp_get_topic_forum_id( $destination_topic->ID ) ); 1335 1342 1336 // Adjust reply to values 1337 $reply_to = bbp_get_reply_to( $reply->ID ); 1338 if ( empty( $reply_to ) ) { 1339 bbp_update_reply_to( $reply->ID, $source_topic->ID ); 1340 } 1343 // Update the reply position 1344 bbp_update_reply_position( $reply->ID ); 1341 1345 1342 1346 // Do additional actions per merged reply
Note: See TracChangeset
for help on using the changeset viewer.