diff -r 7fce2516ad28 wp-content/plugins/buddypress/bp-core/bp-core-classes.php
a
|
b
|
|
119 | 119 | if ( 'popular' == $type ) |
120 | 120 | $sql['select_popular'] = ", um.meta_value as total_friend_count"; |
121 | 121 | |
122 | | if ( 'alphabetical' == $type ) |
123 | | $sql['select_alpha'] = ", pd.value as fullname"; |
124 | | |
125 | 122 | $sql['from'] = "FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN " . CUSTOM_USER_META_TABLE . " um ON um.user_id = u.ID"; |
126 | 123 | |
127 | 124 | if ( $search_terms && function_exists( 'xprofile_install' ) || 'alphabetical' == $type ) |
… |
… |
|
138 | 135 | if ( 'online' == $type ) |
139 | 136 | $sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP()"; |
140 | 137 | |
141 | | if ( 'alphabetical' == $type ) |
142 | | $sql['where_alpha'] = "AND pd.field_id = 1"; |
143 | | |
144 | 138 | if ( $include ) { |
145 | 139 | if ( is_array( $include ) ) |
146 | 140 | $uids = $wpdb->escape( implode( ',', (array)$include ) ); |
… |
… |
|
176 | 170 | $sql[] = "ORDER BY u.user_registered DESC"; |
177 | 171 | break; |
178 | 172 | case 'alphabetical': |
179 | | $sql[] = "ORDER BY pd.value ASC"; |
| 173 | $sql[] = "ORDER BY u.display_name ASC"; |
180 | 174 | break; |
181 | 175 | case 'random': |
182 | 176 | $sql[] = "ORDER BY rand()"; |