Changeset 2822 for trunk/bp-activity.php
- Timestamp:
- 03/08/2010 04:20:25 PM (16 years ago)
- File:
-
- 1 edited
-
trunk/bp-activity.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-activity.php
r2761 r2822 248 248 if ( !$has_access ) { 249 249 bp_core_add_message( __( 'You do not have access to this activity.', 'buddypress' ), 'error' ); 250 bp_core_redirect( $bp->loggedin_user->domain ); 250 251 if ( is_user_logged_in() ) 252 bp_core_redirect( $bp->loggedin_user->domain ); 253 else 254 bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . clean_url( $bp->root_domain . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) ); 251 255 } 252 256 … … 312 316 if ( $activity->component == $bp->groups->id ) { 313 317 if ( $activity->user_id ) 314 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id ;318 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id . '/'; 315 319 else { 316 320 if ( $group = groups_get_group( array( 'group_id' => $activity->item_id ) ) ) 317 $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id ;321 $redirect = bp_get_group_permalink( $group ) . $bp->activity->slug . '/' . $activity->id . '/'; 318 322 } 319 323 } else 320 324 $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . $bp->activity->slug . '/' . $activity->id; 321 325 326 $redirect = apply_filters( 'bp_activity_permalink_redirect_url', $redirect, &$activity ); 327 322 328 if ( !$redirect ) 323 329 bp_core_redirect( $bp->root_domain ); 324 330 325 331 /* Redirect to the actual activity permalink page */ 326 bp_core_redirect( apply_filters( 'bp_activity_action_permalink_url', $redirect . '/', &$activity ));332 bp_core_redirect( $redirect ); 327 333 } 328 334 add_action( 'wp', 'bp_activity_action_permalink_router', 3 ); … … 715 721 716 722 $defaults = array( 723 'id' => false, 717 724 'content' => false, 718 725 'user_id' => $bp->loggedin_user->id, … … 736 743 /* Insert the activity comment */ 737 744 $comment_id = bp_activity_add( array( 745 'id' => $id, 738 746 'action' => apply_filters( 'bp_activity_comment_action', sprintf( __( '%s posted a new activity comment:', 'buddypress' ), bp_core_get_userlink( $user_id ) ) ), 739 747 'content' => apply_filters( 'bp_activity_comment_content', $content ), … … 773 781 'secondary_item_id' => false, 774 782 'action' => false, 775 'content' => false 783 'content' => false, 784 'date_recorded' => false, 776 785 ); 777 786 … … 779 788 extract( $r, EXTR_SKIP ); 780 789 781 return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content ) );790 return apply_filters( 'bp_activity_get_activity_id', BP_Activity_Activity::get_id( $user_id, $component, $type, $item_id, $secondary_item_id, $action, $content, $date_recorded ) ); 782 791 } 783 792
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)