Ticket #3679: 3679.activity.01.diff
File 3679.activity.01.diff, 3.0 KB (added by , 13 years ago) |
---|
-
bp-activity/bp-activity-template.php
104 104 105 105 var $full_name; 106 106 107 function __construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude = false, $in = false, $spam = 'ham_only' ) {107 function __construct( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude = false, $in = false, $spam = 'ham_only', $page_arg = 'acpage' ) { 108 108 global $bp; 109 109 110 $this->pag_page = isset( $_REQUEST[ 'acpage'] ) ? intval( $_REQUEST['acpage'] ) : $page;110 $this->pag_page = isset( $_REQUEST[$page_arg] ) ? intval( $_REQUEST[$page_arg] ) : $page; 111 111 $this->pag_num = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page; 112 112 113 113 // Check if blog/forum replies are disabled … … 163 163 164 164 if ( (int) $this->total_activity_count && (int) $this->pag_num ) { 165 165 $this->pag_links = paginate_links( array( 166 'base' => add_query_arg( 'acpage', '%#%' ),166 'base' => add_query_arg( $page_arg, '%#%' ), 167 167 'format' => '', 168 168 'total' => ceil( (int) $this->total_activity_count / (int) $this->pag_num ), 169 169 'current' => (int) $this->pag_page, … … 299 299 'show_hidden' => $show_hidden, // Show activity items that are hidden site-wide? 300 300 'spam' => 'ham_only', // Hide spammed items 301 301 302 'page_arg' => 'acpage', // See https://buddypress.trac.wordpress.org/ticket/3679 303 302 304 // Scope - pre-built activity filters for a user (friends/groups/favorites/mentions) 303 305 'scope' => $scope, 304 306 … … 387 389 if ( !empty( $include ) && ( 'ham_only' == $spam ) ) 388 390 $spam = 'all'; 389 391 390 $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in, $spam );392 $activities_template = new BP_Activity_Template( $page, $per_page, $max, $include, $sort, $filter, $search_terms, $display_comments, $show_hidden, $exclude, $in, $spam, $page_arg ); 391 393 392 394 return apply_filters( 'bp_has_activities', $activities_template->has_activities(), $activities_template ); 393 395 } … … 896 898 } else if ( !empty( $activities_template->current_comment->display_name ) ) { 897 899 $dn_default = $activities_template->current_comment->display_name; 898 900 } 899 901 900 902 $alt_default = isset( $dn_default ) ? sprintf( __( 'Profile picture of %s', 'buddypress' ), $activities_template->activity->display_name ) : __( 'Profile picture', 'buddypress' ); 901 903 902 904 $defaults = array( 903 905 'alt' => $alt_default, 904 906 'class' => 'avatar', … … 992 994 case 'groups' : 993 995 $object = 'group'; 994 996 $item_id = $activities_template->activity->item_id; 995 997 996 998 if ( empty( $alt ) ) { 997 999 $group = groups_get_group( $item_id ); 998 1000 if ( isset( $group->name ) ) {