Changeset 2924
- Timestamp:
- 04/14/2010 08:49:34 PM (14 years ago)
- Location:
- branches/1.2/bp-core
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-core/bp-core-classes.php
r2923 r2924 142 142 $sql['where_alpha'] = "AND pd.field_id = 1"; 143 143 144 if ( $user_id && function_exists( 'friends_install' ) ) { 144 if ( $include ) { 145 if ( is_array( $include ) ) 146 $uids = $wpdb->escape( implode( ',', (array)$include ) ); 147 else 148 $uids = $wpdb->escape( $include ); 149 150 if ( !empty( $uids ) ) 151 $sql['where_users'] = "AND u.ID IN ({$uids})"; 152 } 153 154 else if ( $user_id && function_exists( 'friends_install' ) ) { 145 155 $friend_ids = friends_get_friend_user_ids( $user_id ); 146 156 $friend_ids = $wpdb->escape( implode( ',', (array)$friend_ids ) ); … … 152 162 return false; 153 163 } 154 }155 156 if ( $include ) {157 /* Unset previous user restriction SQL */158 unset( $sql['where_friends'] );159 160 if ( is_array( $include ) )161 $uids = $wpdb->escape( implode( ',', (array)$include ) );162 else163 $uids = $wpdb->escape( $include );164 165 if ( !empty( $uids ) )166 $sql['where_users'] = "AND u.ID IN ({$uids})";167 164 } 168 165 -
branches/1.2/bp-core/bp-core-templatetags.php
r2923 r2924 154 154 $per_page = $max; 155 155 } 156 157 /* Make sure we return no members if we looking at friendship requests and there are none. */ 158 if ( empty( $include ) && $bp->friends->slug == $bp->current_component && 'requests' == $bp->current_action ) 159 return false; 156 160 157 161 $members_template = new BP_Core_Members_Template( $type, $page, $per_page, $max, $user_id, $search_terms, $include, (bool)$populate_extras );
Note: See TracChangeset
for help on using the changeset viewer.