Skip to:
Content

bbPress.org

Changeset 5729


Ignore:
Timestamp:
05/12/2015 07:35:02 PM (10 years ago)
Author:
johnjamesjacoby
Message:

Topics: In bbp_move_topic_handler(), clean both old and new forum caches before updating forum hierarchies.

Fixes issue where moving a topic would result in incorrect counts for both forums, due to out-of-date cache values.

Props thebrandonallen. Fixes #2322.

File:
1 edited

Legend:

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

    r5691 r5729  
    10321032    $new_forum_id = bbp_get_forum_id( $new_forum_id );
    10331033
     1034    // Clean old and new forum caches before proceeding, to ensure subsequent
     1035    // calls to forum objects are using updated data.
     1036    bbp_clean_post_cache( $old_forum_id );
     1037    bbp_clean_post_cache( $new_forum_id );
     1038
    10341039    // Update topic forum's ID
    10351040    bbp_update_topic_forum_id( $topic_id, $new_forum_id );
Note: See TracChangeset for help on using the changeset viewer.