Changeset 7145 for trunk/bp-groups/bp-groups-classes.php
- Timestamp:
- 06/04/2013 03:04:29 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-groups/bp-groups-classes.php
r7144 r7145 988 988 // these defaults). 989 989 $this->query_vars = wp_parse_args( $this->query_vars, array( 990 'group_id' => 0, 991 'group_role' => array( 'member' ), 992 'exclude_banned' => true, 990 'group_id' => 0, 991 'group_role' => array( 'member' ), 993 992 ) ); 994 993 … … 1051 1050 // which there is no dedicated is_ column), figure out a list 1052 1051 // of columns *not* to match 1052 $roles_sql = ''; 1053 1053 if ( in_array( 'member', $roles ) ) { 1054 1054 $role_columns = array(); … … 1056 1056 $role_columns[] = 'is_' . $excluded_role . ' = 0'; 1057 1057 } 1058 $roles_sql = '(' . implode( ' AND ', $role_columns ) . ')'; 1058 1059 if ( ! empty( $role_columns ) ) { 1060 $roles_sql = '(' . implode( ' AND ', $role_columns ) . ')'; 1061 } 1059 1062 1060 1063 // When querying for a set of roles *not* containing 'member', … … 1065 1068 $role_columns[] = 'is_' . $role . ' = 1'; 1066 1069 } 1067 $roles_sql = '(' . implode( ' OR ', $role_columns ) . ')'; 1070 1071 if ( ! empty( $role_columns ) ) { 1072 $roles_sql = '(' . implode( ' OR ', $role_columns ) . ')'; 1073 } 1068 1074 } 1069 1075 1070 1076 if ( ! empty( $roles_sql ) ) { 1071 1077 $sql['where'][] = $roles_sql; 1072 }1073 1074 if ( ! empty( $this->query_vars['exclude_banned'] ) ) {1075 $sql['where'][] = "is_banned = 0";1076 1078 } 1077 1079
Note: See TracChangeset
for help on using the changeset viewer.