Changeset 3145 for branches/1.2/bp-friends.php
- Timestamp:
- 07/22/2010 11:09:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/1.2/bp-friends.php
r3142 r3145 156 156 <td></td> 157 157 <td><?php _e( 'A member sends you a friendship request', 'buddypress' ) ?></td> 158 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php if ( !get_user meta( $current_user->id,'notification_friends_friendship_request') || 'yes' == get_usermeta( $current_user->id,'notification_friends_friendship_request') ) { ?>checked="checked" <?php } ?>/></td>159 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php if ( get_user meta( $current_user->id,'notification_friends_friendship_request') == 'no' ) { ?>checked="checked" <?php } ?>/></td>158 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_request]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) ) { ?>checked="checked" <?php } ?>/></td> 159 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_request]" value="no" <?php if ( get_user_meta( $current_user->id, 'notification_friends_friendship_request', true ) == 'no' ) { ?>checked="checked" <?php } ?>/></td> 160 160 </tr> 161 161 <tr> 162 162 <td></td> 163 163 <td><?php _e( 'A member accepts your friendship request', 'buddypress' ) ?></td> 164 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php if ( !get_user meta( $current_user->id,'notification_friends_friendship_accepted') || 'yes' == get_usermeta( $current_user->id,'notification_friends_friendship_accepted') ) { ?>checked="checked" <?php } ?>/></td>165 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php if ( 'no' == get_user meta( $current_user->id,'notification_friends_friendship_accepted') ) { ?>checked="checked" <?php } ?>/></td>164 <td class="yes"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="yes" <?php if ( !get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) || 'yes' == get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php } ?>/></td> 165 <td class="no"><input type="radio" name="notifications[notification_friends_friendship_accepted]" value="no" <?php if ( 'no' == get_user_meta( $current_user->id, 'notification_friends_friendship_accepted', true ) ) { ?>checked="checked" <?php } ?>/></td> 166 166 </tr> 167 167 … … 488 488 489 489 if ( !$count = wp_cache_get( 'bp_total_friend_count_' . $user_id, 'bp' ) ) { 490 $count = get_user meta( $user_id, 'total_friend_count');490 $count = get_user_meta( $user_id, 'total_friend_count', true ); 491 491 if ( empty( $count ) ) $count = 0; 492 492 wp_cache_set( 'bp_total_friend_count_' . $user_id, $count, 'bp' ); … … 591 591 function friends_update_friend_totals( $initiator_user_id, $friend_user_id, $status = 'add' ) { 592 592 if ( 'add' == $status ) { 593 update_user meta( $initiator_user_id, 'total_friend_count', (int)get_usermeta( $initiator_user_id, 'total_friend_count') + 1 );594 update_user meta( $friend_user_id, 'total_friend_count', (int)get_usermeta( $friend_user_id, 'total_friend_count') + 1 );593 update_user_meta( $initiator_user_id, 'total_friend_count', (int)get_user_meta( $initiator_user_id, 'total_friend_count', true ) + 1 ); 594 update_user_meta( $friend_user_id, 'total_friend_count', (int)get_user_meta( $friend_user_id, 'total_friend_count', true ) + 1 ); 595 595 } else { 596 update_user meta( $initiator_user_id, 'total_friend_count', (int)get_usermeta( $initiator_user_id, 'total_friend_count') - 1 );597 update_user meta( $friend_user_id, 'total_friend_count', (int)get_usermeta( $friend_user_id, 'total_friend_count') - 1 );596 update_user_meta( $initiator_user_id, 'total_friend_count', (int)get_user_meta( $initiator_user_id, 'total_friend_count', true ) - 1 ); 597 update_user_meta( $friend_user_id, 'total_friend_count', (int)get_user_meta( $friend_user_id, 'total_friend_count', true ) - 1 ); 598 598 } 599 599 } … … 603 603 604 604 /* Remove usermeta */ 605 delete_user meta( $user_id, 'total_friend_count' );605 delete_user_meta( $user_id, 'total_friend_count' ); 606 606 607 607 /* Remove friendship requests FROM user */
Note: See TracChangeset
for help on using the changeset viewer.