Changeset 6120 for trunk/bp-friends/bp-friends-classes.php
- Timestamp:
- 06/19/2012 01:16:40 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends/bp-friends-classes.php
r5931 r6120 17 17 var $friend; 18 18 19 publicfunction __construct( $id = null, $is_request = false, $populate_friend_details = true ) {19 function __construct( $id = null, $is_request = false, $populate_friend_details = true ) { 20 20 $this->is_request = $is_request; 21 21 … … 27 27 } 28 28 29 privatefunction populate() {29 function populate() { 30 30 global $wpdb, $bp; 31 31 … … 47 47 } 48 48 49 publicfunction save() {49 function save() { 50 50 global $wpdb, $bp; 51 51 … … 73 73 } 74 74 75 publicfunction delete() {75 function delete() { 76 76 global $wpdb, $bp; 77 77 … … 81 81 /** Static Methods ********************************************************/ 82 82 83 public staticfunction get_friend_user_ids( $user_id, $friend_requests_only = false, $assoc_arr = false ) {83 function get_friend_user_ids( $user_id, $friend_requests_only = false, $assoc_arr = false ) { 84 84 global $wpdb, $bp; 85 85 … … 106 106 } 107 107 108 public staticfunction get_friendship_id( $user_id, $friend_id ) {108 function get_friendship_id( $user_id, $friend_id ) { 109 109 global $wpdb, $bp; 110 110 … … 112 112 } 113 113 114 public staticfunction get_friendship_request_user_ids( $user_id ) {114 function get_friendship_request_user_ids( $user_id ) { 115 115 global $wpdb, $bp; 116 116 … … 118 118 } 119 119 120 public staticfunction total_friend_count( $user_id = 0 ) {120 function total_friend_count( $user_id = 0 ) { 121 121 global $wpdb, $bp; 122 122 … … 137 137 } 138 138 139 public staticfunction search_friends( $filter, $user_id, $limit = null, $page = null ) {139 function search_friends( $filter, $user_id, $limit = null, $page = null ) { 140 140 global $wpdb, $bp; 141 141 … … 177 177 } 178 178 179 public staticfunction check_is_friend( $loggedin_userid, $possible_friend_userid ) {179 function check_is_friend( $loggedin_userid, $possible_friend_userid ) { 180 180 global $wpdb, $bp; 181 181 … … 196 196 } 197 197 198 public staticfunction get_bulk_last_active( $user_ids ) {198 function get_bulk_last_active( $user_ids ) { 199 199 global $wpdb; 200 200 … … 202 202 } 203 203 204 public staticfunction accept($friendship_id) {204 function accept($friendship_id) { 205 205 global $wpdb, $bp; 206 206 … … 208 208 } 209 209 210 public staticfunction withdraw($friendship_id) {210 function withdraw($friendship_id) { 211 211 global $wpdb, $bp; 212 212 … … 214 214 } 215 215 216 public staticfunction reject($friendship_id) {216 function reject($friendship_id) { 217 217 global $wpdb, $bp; 218 218 … … 220 220 } 221 221 222 public staticfunction search_users( $filter, $user_id, $limit = null, $page = null ) {222 function search_users( $filter, $user_id, $limit = null, $page = null ) { 223 223 global $wpdb; 224 224 … … 246 246 } 247 247 248 public staticfunction search_users_count( $filter ) {248 function search_users_count( $filter ) { 249 249 global $wpdb, $bp; 250 250 … … 269 269 } 270 270 271 public staticfunction sort_by_name( $user_ids ) {271 function sort_by_name( $user_ids ) { 272 272 global $wpdb, $bp; 273 273 … … 278 278 } 279 279 280 public staticfunction get_random_friends( $user_id, $total_friends = 5 ) {280 function get_random_friends( $user_id, $total_friends = 5 ) { 281 281 global $wpdb, $bp; 282 282 … … 296 296 } 297 297 298 public staticfunction get_invitable_friend_count( $user_id, $group_id ) {298 function get_invitable_friend_count( $user_id, $group_id ) { 299 299 300 300 // Setup some data we'll use below … … 323 323 } 324 324 325 public staticfunction get_user_ids_for_friendship( $friendship_id ) {325 function get_user_ids_for_friendship( $friendship_id ) { 326 326 global $wpdb, $bp; 327 327 … … 329 329 } 330 330 331 public staticfunction delete_all_for_user( $user_id ) {331 function delete_all_for_user( $user_id ) { 332 332 global $wpdb, $bp; 333 333
Note: See TracChangeset
for help on using the changeset viewer.