Changeset 1238 for trunk/bp-core/bp-core-ajax.php
- Timestamp:
- 03/19/2009 01:35:32 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-ajax.php
r1197 r1238 8 8 switch ( $_POST['filter'] ) { 9 9 case 'newest-members': 10 $users = BP_Core_User::get_newest_users( $_POST['max-members'], 1 ); 10 if ( !$users = wp_cache_get( 'newest_users', 'bp' ) ) { 11 $users = BP_Core_User::get_newest_users( $_POST['max-members'], 1 ); 12 wp_cache_set( 'newest_users', $users, 'bp' ); 13 } 11 14 break; 12 15 case 'recently-active-members': 13 $users = BP_Core_User::get_active_users( $_POST['max-members'], 1 ); 16 if ( !$users = wp_cache_get( 'active_users', 'bp' ) ) { 17 $users = BP_Core_User::get_active_users( $_POST['max-members'], 1 ); 18 wp_cache_set( 'active_users', $users, 'bp' ); 19 } 14 20 break; 15 21 case 'popular-members': 16 $users = BP_Core_User::get_popular_users( $_POST['max-members'], 1 ); 22 if ( !$users = wp_cache_get( 'popular_users', 'bp' ) ) { 23 $users = BP_Core_User::get_popular_users( $_POST['max-members'], 1 ); 24 wp_cache_set( 'popular_users', $users, 'bp' ); 25 } 17 26 break; 18 27 } … … 117 126 118 127 <div class="action"> 119 <?php bp_add_friend_button( $user->user_id ) ?> 128 <?php if ( function_exists('bp_add_friend_button') ) : ?> 129 <?php bp_add_friend_button( $user->user_id ) ?> 130 <?php endif; ?> 120 131 <div class="meta"> 121 132 <?php if ( $user_obj->total_friends ) echo $user_obj->total_friends ?><?php if ( $user_obj->total_blogs ) echo ', ' . $user_obj->total_blogs ?><?php if ( $user_obj->total_groups ) echo ', ' . $user_obj->total_groups ?>
Note: See TracChangeset
for help on using the changeset viewer.