Changeset 5302 for trunk/bp-friends/bp-friends-classes.php
- Timestamp:
- 11/08/2011 01:24:47 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-classes.php
r5301 r5302 127 127 128 128 if ( !$user_id ) 129 $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : $bp->loggedin_user->id;129 $user_id = ( bp_displayed_user_id() ) ? bp_displayed_user_id() : bp_loggedin_user_id(); 130 130 131 131 /* This is stored in 'total_friend_count' usermeta. … … 148 148 149 149 if ( !$user_id ) 150 $user_id = $bp->loggedin_user->id;150 $user_id = bp_loggedin_user_id(); 151 151 152 152 $filter = like_escape( $wpdb->escape( $filter ) ); … … 210 210 global $wpdb, $bp; 211 211 212 return $wpdb->query( $wpdb->prepare( "UPDATE {$bp->friends->table_name} SET is_confirmed = 1, date_created = %s WHERE id = %d AND friend_user_id = %d", bp_core_current_time(), $friendship_id, $bp->loggedin_user->id) );212 return $wpdb->query( $wpdb->prepare( "UPDATE {$bp->friends->table_name} SET is_confirmed = 1, date_created = %s WHERE id = %d AND friend_user_id = %d", bp_core_current_time(), $friendship_id, bp_loggedin_user_id() ) ); 213 213 } 214 214 … … 216 216 global $wpdb, $bp; 217 217 218 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->friends->table_name} WHERE id = %d AND friend_user_id = %d", $friendship_id, $bp->loggedin_user->id) );218 return $wpdb->query( $wpdb->prepare( "DELETE FROM {$bp->friends->table_name} WHERE id = %d AND friend_user_id = %d", $friendship_id, bp_loggedin_user_id() ) ); 219 219 } 220 220
Note: See TracChangeset
for help on using the changeset viewer.