Changeset 7275
- Timestamp:
- 07/16/2013 07:31:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r7273 r7275 464 464 if ( ! empty( $r['user_id'] ) ) { 465 465 $total_sql['where'][] = $wpdb->prepare( "m.group_id = g.id AND m.user_id = %d AND m.is_confirmed = 1 AND m.is_banned = 0", $r['user_id'] ); 466 } 467 468 // Temporary implementation of meta_query for total count 469 // See #5099 470 if ( ! empty( $meta_query_sql['where'] ) ) { 471 // Join the groupmeta table 472 $total_sql['select'] .= ", {$bp->groups->table_name_groupmeta} gmmq"; 473 474 // Modify the meta_query clause from paged_sql for our syntax 475 $meta_query_clause = preg_replace( '/^\s*AND/', '', $meta_query_sql['where'] ); 476 $meta_query_clause = str_replace( $bp->groups->table_name_groupmeta, 'gmmq', $meta_query_clause ); 477 $total_sql['where'][] = $meta_query_clause; 466 478 } 467 479
Note: See TracChangeset
for help on using the changeset viewer.