Skip to:
Content

BuddyPress.org

Changeset 9211


Ignore:
Timestamp:
12/04/2014 01:59:27 AM (10 years ago)
Author:
boonebgorges
Message:

Better regex for parsing member type taxonomy SQL in WP < 4.1.

See #6006.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-core/bp-core-classes.php

    r9210 r9211  
    437437
    438438
     439
    439440                // Grab the first term_relationships clause and convert to a subquery.
    440                 if ( preg_match( '/' . $wpdb->term_relationships . '\.term_taxonomy_id.*/', $member_type_sql_clauses['where'], $matches ) ) {
     441                if ( preg_match( '/' . $wpdb->term_relationships . '\.term_taxonomy_id IN \([0-9, ]+\)/', $member_type_sql_clauses['where'], $matches ) ) {
    441442                    $sql['where']['member_type'] = "u.{$this->uid_name} IN ( SELECT object_id FROM $wpdb->term_relationships WHERE {$matches[0]} )";
    442443                }
Note: See TracChangeset for help on using the changeset viewer.