Ignore:
Timestamp:
Dec 29, 2011 4:35:01 AM (17 months ago)
Author:
alec
Message:
  • Add separate pagesize setting for mail messages and contacts (#1488269)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/roundcubemail/program/steps/addressbook/func.inc

    r5645 r5662  
    5757); 
    5858 
     59$PAGE_SIZE = $RCMAIL->config->get('addressbook_pagesize'); 
     60if (!$PAGE_SIZE) { 
     61    $PAGE_SIZE = $RCMAIL->config->get('pagesize', 50); 
     62} 
    5963 
    6064// Addressbook UI 
     
    109113function rcmail_contact_source($source=null, $init_env=false, $writable=false) 
    110114{ 
    111     global $RCMAIL, $OUTPUT, $CONFIG, $CONTACT_COLTYPES; 
     115    global $RCMAIL, $OUTPUT, $CONTACT_COLTYPES, $PAGE_SIZE; 
    112116 
    113117    if (!strlen($source)) { 
     
    117121    // Get object 
    118122    $CONTACTS = $RCMAIL->get_address_book($source, $writable); 
    119     $CONTACTS->set_pagesize($CONFIG['pagesize']); 
     123    $CONTACTS->set_pagesize($PAGE_SIZE); 
    120124 
    121125    // set list properties and session vars 
     
    392396function rcmail_get_rowcount_text($result=null) 
    393397{ 
    394     global $CONTACTS, $CONFIG; 
     398    global $CONTACTS, $PAGE_SIZE; 
    395399 
    396400    // read nr of contacts 
     
    406410            'vars'  => array( 
    407411            'from'  => $result->first + 1, 
    408             'to'    => min($result->count, $result->first + $CONFIG['pagesize']), 
     412            'to'    => min($result->count, $result->first + $PAGE_SIZE), 
    409413            'count' => $result->count) 
    410414        )); 
Note: See TracChangeset for help on using the changeset viewer.