Skip to:
Content

BuddyPress.org

Ticket #5420: 5420.01.patch

File 5420.01.patch, 1.2 KB (added by DJPaul, 12 years ago)
  • bp-groups/bp-groups-template.php

    diff --git a/bp-groups/bp-groups-template.php b/bp-groups/bp-groups-template.php
    index fe6c837..18e9af5 100644
    a b class BP_Groups_Group_Members_Template { 
    20282028                $this->pag_page = isset( $_REQUEST['mlpage'] ) ? intval( $_REQUEST['mlpage'] ) : $r['page'];
    20292029                $this->pag_num  = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
    20302030
     2031                /**
     2032                 * Check the current group is the same as the supplied group ID.
     2033                 * It can differ when using {@link bp_group_has_members()} outside the Groups screens.
     2034                 */
     2035                $current_group = groups_get_current_group();
     2036                if ( ! $current_group || $current_group && $current_group->id !== bp_get_current_group_id() ) {
     2037                        $current_group = groups_get_group( array( 'group_id' => $r['group_id'] ) );
     2038                }
     2039
    20312040                // Assemble the base URL for pagination
    2032                 $base_url = trailingslashit( bp_get_group_permalink( groups_get_current_group() ) . bp_current_action() );
     2041                $base_url = trailingslashit( bp_get_group_permalink( $current_group ) . bp_current_action() );
    20332042                if ( bp_action_variable() ) {
    20342043                        $base_url = trailingslashit( $base_url . bp_action_variable() );
    20352044                }