Making WordPress.org

Changeset 4930


Ignore:
Timestamp:
02/18/2017 10:04:54 PM (10 years ago)
Author:
SergeyBiryukov
Message:

Support Forums: Save bbpress()->topic_query object in Ratings_Compat::review_exists() and restore it in Ratings_Compat::add_topic_form().

This should prevent the query for the current user's review from being overwritten by the main query.

See #2199.

File:
1 edited

Legend:

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

    r4920 r4930  
    312312                                'orderby'       => 'ID',
    313313                        ) );
     314
     315                        $this->review_topic_query = bbpress()->topic_query;
    314316                }
    315317
    … …  
    339341
    340342                if ( $this->review_exists() ) {
     343                        bbpress()->topic_query = $this->review_topic_query;
    341344                        bbp_the_topic();
    342345                        add_filter( 'bbp_is_topic_edit', '__return_true' );
Note: See TracChangeset for help on using the changeset viewer.