Changeset 2381 for trunk/bp-friends.php
- Timestamp:
- 01/20/2010 04:21:20 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-friends.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-friends.php
r2369 r2381 269 269 $defaults = array( 270 270 'user_id' => $bp->loggedin_user->id, 271 'content' => false, 272 'primary_link' => false, 273 'component_name' => $bp->friends->id, 274 'component_action' => false, 271 'action' => '', 272 'content' => '', 273 'primary_link' => '', 274 'component' => $bp->friends->id, 275 'type' => false, 275 276 'item_id' => false, 276 277 'secondary_item_id' => false, … … 282 283 extract( $r, EXTR_SKIP ); 283 284 284 return bp_activity_add( array( 'user_id' => $user_id, ' content' => $content, 'primary_link' => $primary_link, 'component_name' => $component_name, 'component_action' => $component_action, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) );285 return bp_activity_add( array( 'user_id' => $user_id, 'action' => $action, 'content' => $content, 'primary_link' => $primary_link, 'component' => $component, 'type' => $type, 'item_id' => $item_id, 'secondary_item_id' => $secondary_item_id, 'recorded_time' => $recorded_time, 'hide_sitewide' => $hide_sitewide ) ); 285 286 } 286 287 … … 288 289 if ( function_exists('bp_activity_delete_by_item_id') ) { 289 290 extract( (array)$args ); 290 bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component _name' => $bp->friends->id, 'component_action' => $component_action, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) );291 bp_activity_delete_by_item_id( array( 'item_id' => $item_id, 'component' => $bp->friends->id, 'type' => $type, 'user_id' => $user_id, 'secondary_item_id' => $secondary_item_id ) ); 291 292 } 292 293 } … … 389 390 390 391 // Remove the activity stream item for the user who canceled the friendship 391 friends_delete_activity( array( 'item_id' => $friendship_id, ' component_action' => 'friendship_accepted', 'user_id' => $bp->displayed_user->id ) );392 friends_delete_activity( array( 'item_id' => $friendship_id, 'type' => 'friendship_accepted', 'user_id' => $bp->displayed_user->id ) ); 392 393 393 394 do_action( 'friends_friendship_deleted', $friendship_id, $initiator_userid, $friend_userid ); … … 418 419 $initiator_link = bp_core_get_userlink( $friendship->initiator_user_id ); 419 420 $friend_link = bp_core_get_userlink( $friendship->friend_user_id ); 420 421 $primary_link = apply_filters( 'friends_activity_friendship_accepted_primary_link', bp_core_get_user_domain( $friendship->initiator_user_id ), &$friendship );422 421 423 422 /* Record in activity streams for the initiator */ 424 423 friends_record_activity( array( 425 424 'user_id' => $friendship->initiator_user_id, 426 'component_action' => 'friendship_created', 427 'content' => apply_filters( 'friends_activity_friendship_accepted', sprintf( __( '%s and %s are now friends', 'buddypress' ), $initiator_link, $friend_link ), &$friendship ), 428 'primary_link' => $primary_link, 425 'type' => 'friendship_created', 426 'action' => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%s and %s are now friends', 'buddypress' ), $initiator_link, $friend_link ), &$friendship ), 429 427 'item_id' => $friendship_id 430 428 ) ); … … 433 431 friends_record_activity( array( 434 432 'user_id' => $friendship->friend_user_id, 435 'component_action' => 'friendship_created', 436 'content' => apply_filters( 'friends_activity_friendship_accepted', sprintf( __( '%s and %s are now friends', 'buddypress' ), $friend_link, $initiator_link ), &$friendship ), 437 'primary_link' => $primary_link, 433 'type' => 'friendship_created', 434 'action' => apply_filters( 'friends_activity_friendship_accepted_action', sprintf( __( '%s and %s are now friends', 'buddypress' ), $friend_link, $initiator_link ), &$friendship ), 438 435 'item_id' => $friendship_id, 439 436 'hide_sitewide' => true /* We've already got the first entry site wide */
Note: See TracChangeset
for help on using the changeset viewer.