Skip to:
Content

BuddyPress.org

Ticket #3126: bp-core-classes.patch

File bp-core-classes.patch, 1.3 KB (added by dimitryz, 13 years ago)
  • wp-content/plugins/buddypress/bp-core/bp-core-classes.php

    diff -r 7fce2516ad28 wp-content/plugins/buddypress/bp-core/bp-core-classes.php
    a b  
    119119                if ( 'popular' == $type )
    120120                        $sql['select_popular'] = ", um.meta_value as total_friend_count";
    121121
    122                 if ( 'alphabetical' == $type )
    123                         $sql['select_alpha'] = ", pd.value as fullname";
    124 
    125122                $sql['from'] = "FROM " . CUSTOM_USER_TABLE . " u LEFT JOIN " . CUSTOM_USER_META_TABLE . " um ON um.user_id = u.ID";
    126123
    127124                if ( $search_terms && function_exists( 'xprofile_install' ) || 'alphabetical' == $type )
     
    138135                if ( 'online' == $type )
    139136                        $sql['where_online'] = "AND DATE_ADD( um.meta_value, INTERVAL 5 MINUTE ) >= UTC_TIMESTAMP()";
    140137
    141                 if ( 'alphabetical' == $type )
    142                         $sql['where_alpha'] = "AND pd.field_id = 1";
    143 
    144138                if ( $include ) {
    145139                        if ( is_array( $include ) )
    146140                                $uids = $wpdb->escape( implode( ',', (array)$include ) );
     
    176170                                $sql[] = "ORDER BY u.user_registered DESC";
    177171                                break;
    178172                        case 'alphabetical':
    179                                 $sql[] = "ORDER BY pd.value ASC";
     173                                $sql[] = "ORDER BY u.display_name ASC";
    180174                                break;
    181175                        case 'random':
    182176                                $sql[] = "ORDER BY rand()";