Skip to:
Content

bbPress.org

Changeset 6098


Ignore:
Timestamp:
09/15/2016 07:47:20 AM (5 years ago)
Author:
netweb
Message:

Topics: Call bbp_move_topic_handler() when moving a topic to a new forum in the back end.

This changeset ensures that both the source and destination forums meta is updated when a topic is moved.

Fixes #2587.

File:
1 edited

Legend:

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

    r6056 r6098  
    324324        // Formally update the topic
    325325        bbp_update_topic( $topic_id, $forum_id, $anonymous_data, $author_id, $is_edit );
     326
     327        // If the topic was moved to a new forum, move the topic to update all the meta
     328        if ( $forum_id !== $topic->post_parent ) {
     329            bbp_move_topic_handler( $topic_id, $topic->post_parent, $forum_id );
     330        }
    326331
    327332        // Allow other fun things to happen
Note: See TracChangeset for help on using the changeset viewer.