Skip to:
Content

bbPress.org

Changeset 5404


Ignore:
Timestamp:
06/15/2014 03:42:58 PM (5 years ago)
Author:
johnjamesjacoby
Message:

Correctly compare source & destination topic post_date values in bbp_merge_topic_handler(). Fixes issue where incorrect post would be updated when merging older topics into newer ones.

Also update the reply position for all newly relocated replies. Hat-tip netweb. Fixes #2528.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/topics/functions.php

    r5378 r5404  
    11941194
    11951195    // Check if the destination topic is older than the source topic
    1196     if ( strtotime( $source_topic->post_date ) < strtotime( $destination_topic->post_date ) ) {
     1196    if ( strtotime( $destination_topic->post_date ) < strtotime( $source_topic->post_date ) ) {
    11971197
    11981198        // Set destination topic post_date to 1 second before source topic
     
    12961296                'post_type'   => bbp_get_reply_post_type(),
    12971297                'post_parent' => $destination_topic->ID,
     1298                'menu_order'  => bbp_get_reply_position_raw( $reply->ID, $destination_topic->ID ),
    12981299                'guid'        => ''
    12991300            ) );
Note: See TracChangeset for help on using the changeset viewer.