Changeset 20 for trunk/includes

Show
Ignore:
Timestamp:
08/12/05 17:31:00 (7 years ago)
Author:
alexx
Message:
  • fix number of item in pager system to 10 by default
  • add link header when pager is actif (Add link to First, Back, Next and Last)
  • modify pager system to use less memory (re-introduce LIMIT in sql query), see #20
  • fix size of "saved" table to be the same as inbox and sent
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/includes/pager.inc.php

    r19 r20  
    2727class Pager_dotnode extends Pager 
    2828{ 
    29         function factory($data, $params=null) 
     29        function factory($data=null, $params=null) 
    3030        { 
    3131                $default_params = array( 
    3232                        'mode'       => 'Sliding', 
    33                         'perPage'    => 4, 
     33                        'perPage'    => 10, 
    3434                        'delta'      => 2, 
    3535                        'urlVar'     => 'p', 
     
    4545                        'lastPagePost' => '', 
    4646                        ); 
    47  
    48                 $params['itemData'] = $data; 
     47                if(!is_null($data)) 
     48                        $params['itemData'] = $data; 
    4949                return parent::factory($default_params + $params); 
    5050        }