Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
06/10/2009 08:49:07 PM (17 years ago)
Author:
apeatling
Message:

Fixing bug where pagination links would break when the max value was more than the total number of items being returned.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r1529 r1538  
    468468            $this->group_count = 1;
    469469        } else {
    470             if ( !$max )
     470            if ( !$max || $max >= (int)$this->groups['total'] )
    471471                $this->total_group_count = (int)$this->groups['total'];
    472472            else
     
    16421642        $this->members = BP_Groups_Member::get_all_for_group( $group_id, $this->pag_num, $this->pag_page, $exclude_admins_mods, $exclude_banned );
    16431643       
    1644         if ( !$max )
     1644        if ( !$max || $max >= (int)$this->members['count'] )
    16451645            $this->total_member_count = (int)$this->members['count'];
    16461646        else
     
    19181918        }
    19191919       
    1920         if ( !$max )
     1920        if ( !$max || $max >= (int)$this->groups['total'] )
    19211921            $this->total_group_count = (int)$this->groups['total'];
    19221922        else
     
    22232223        $this->requests = BP_Groups_Group::get_membership_requests( $group_id, $this->pag_num, $this->pag_page );       
    22242224
    2225         if ( !$max )
     2225        if ( !$max || $max >= (int)$this->requests['total'] )
    22262226            $this->total_request_count = (int)$this->requests['total'];
    22272227        else
Note: See TracChangeset for help on using the changeset viewer.