Skip to:
Content

BuddyPress.org

Changeset 3749


Ignore:
Timestamp:
01/19/2011 11:55:20 PM (14 years ago)
Author:
djpaul
Message:

Allow unlimited per_page setting for members loop. Fixes #1991

File:
1 edited

Legend:

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

    r3745 r3749  
    2121        global $bp;
    2222
    23         $this->pag_page = isset( $_REQUEST['upage'] ) ? intval( $_REQUEST['upage'] ) : $page_number;
    24         $this->pag_num  = isset( $_REQUEST['num'] ) ? intval( $_REQUEST['num'] ) : $per_page;
    25         $this->type     = $type;
     23        $this->pag_page  = !empty( $_REQUEST['upage'] ) ? intval( $_REQUEST['upage'] ) : (int)$page_number;
     24        $this->pag_num   = !empty( $_REQUEST['num'] )   ? intval( $_REQUEST['num'] )   : (int)$per_page;
     25        $this->type      = $type;
     26
     27        if ( !$this->pag_num )
     28            $this->pag_num = 1;
    2629
    2730        if ( isset( $_REQUEST['letter'] ) && '' != $_REQUEST['letter'] )
Note: See TracChangeset for help on using the changeset viewer.