Skip to:
Content

bbPress.org


Ignore:
Timestamp:
03/15/2013 08:34:43 AM (13 years ago)
Author:
johnjamesjacoby
Message:

Remove meta query check from _bbp_has_replies_where(), add some brackets to improve readability. Addresses regression introduced in r4795. See #2221

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/replies/functions.php

    r4798 r4805  
    17291729function _bbp_has_replies_where( $where = '', $query = false ) {
    17301730
     1731    /** Bail ******************************************************************/
     1732
    17311733    // Bail if the sky is falling
    1732     if ( empty( $where ) || empty( $query ) )
     1734    if ( empty( $where ) || empty( $query ) ) {
    17331735        return $where;
     1736    }
    17341737
    17351738    // Bail if no post_parent to replace
    1736     if ( ! is_numeric( $query->get( 'post_parent' ) ) )
     1739    if ( ! is_numeric( $query->get( 'post_parent' ) ) ) {
    17371740        return $where;
     1741    }
    17381742
    17391743    // Bail if not a topic and reply query
    1740     if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) )
     1744    if ( array( bbp_get_topic_post_type(), bbp_get_reply_post_type() ) != $query->get( 'post_type' ) ) {
    17411745        return $where;
    1742 
    1743     // Bail if meta query (cannot FORCE INDEX when join'ing postmeta)
    1744     if ( $query->get( 'meta_key' ) || $query->get( 'meta_query' ) )
     1746    }
     1747
     1748    // Bail if including or excluding specific post ID's
     1749    if ( $query->get( 'post__not_in' ) || $query->get( 'post__in' ) ) {
    17451750        return $where;
    1746 
    1747     // Bail if including or excluding specific post ID's
    1748     if ( $query->get( 'post__not_in' ) || $query->get( 'post__in' ) )
    1749         return $where;
     1751    }
     1752
     1753    /** Proceed ***************************************************************/
    17501754
    17511755    global $wpdb;
Note: See TracChangeset for help on using the changeset viewer.