Making WordPress.org

Changeset 5672


Ignore:
Timestamp:
07/15/2017 11:11:09 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Update topic meta on archiving/unarchiving a reply.

See #2043.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-moderators.php

    r5641 r5672  
    465465
    466466                if ( bbp_is_reply( $post->ID ) ) {
    467                     bbp_increase_topic_reply_count_hidden( bbp_get_reply_topic_id( $post->ID ) );
     467                    $topic_id = bbp_get_reply_topic_id( $post->ID );
     468
     469                    bbp_update_topic_last_reply_id( $topic_id );
     470                    bbp_update_topic_last_active_id( $topic_id );
     471                    bbp_update_topic_last_active_time( $topic_id );
     472                    bbp_update_topic_voice_count( $topic_id );
     473
     474                    bbp_decrease_topic_reply_count( $topic_id );
     475                    bbp_increase_topic_reply_count_hidden( $topic_id );
    468476                } else {
    469477                    bbp_unstick_topic( $post->ID );
     
    501509
    502510                if ( bbp_is_reply( $post->ID ) ) {
    503                     bbp_decrease_topic_reply_count_hidden( bbp_get_reply_topic_id( $post->ID ) );
     511                    $topic_id = bbp_get_reply_topic_id( $post->ID );
     512
     513                    bbp_update_topic_last_reply_id( $topic_id );
     514                    bbp_update_topic_last_active_id( $topic_id );
     515                    bbp_update_topic_last_active_time( $topic_id );
     516                    bbp_update_topic_voice_count( $topic_id );
     517
     518                    bbp_increase_topic_reply_count( $topic_id );
     519                    bbp_decrease_topic_reply_count_hidden( $topic_id );
    504520                }
    505521
Note: See TracChangeset for help on using the changeset viewer.