diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2005-09-11 19:05:25 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2005-09-11 19:05:25 +0000 |
| commit | 279e25a693f3bc92652da91821dfc1339c535937 (patch) | |
| tree | a65b299623ad479487de26b12b70a23c60771b78 /list.php | |
| parent | bda5e43edf6556ba6811a8768098cc023457b44c (diff) | |
| download | pigeonholes-279e25a693f3bc92652da91821dfc1339c535937.tar.gz pigeonholes-279e25a693f3bc92652da91821dfc1339c535937.tar.bz2 pigeonholes-279e25a693f3bc92652da91821dfc1339c535937.zip | |
reduce query count by 50% for getList()
Diffstat (limited to 'list.php')
| -rw-r--r-- | list.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -3,7 +3,7 @@ * $Header * * @author xing <xing@synapse.plus.com> - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ * @package pigeonholes * @subpackage functions */ @@ -31,8 +31,7 @@ $listHash = array( 'find' => !empty( $_REQUEST['find'] ) ? $_REQUEST['find'] : NULL, ); -$gBitSmarty->assign( 'pigeonList', $pigeonList = $gPigeonholes->getList( $listHash, TRUE, FALSE ) ); -$gBitSmarty->assign( 'numPages', ceil( $pigeonList['cant'] / $gBitSystem->mPrefs['maxRecords'] ) ); +$pigeonList = $gPigeonholes->getList( $listHash, TRUE, FALSE ); // set up structure related stuff foreach( $pigeonList['data'] as $key => $pigeonhole ) { @@ -44,6 +43,7 @@ foreach( $pigeonList['data'] as $key => $pigeonhole ) { //$gBitSmarty->assign_by_ref('offset', $offset); $gBitSmarty->assign( 'pigeonList', $pigeonList['data'] ); $gBitSmarty->assign( 'pigeonCount', $pigeonList['cant'] ); +$gBitSmarty->assign( 'numPages', ceil( $pigeonList['cant'] / $gBitSystem->mPrefs['maxRecords'] ) ); $gBitSystem->display( 'bitpackage:pigeonholes/list.tpl', tra( 'List Pigeonholes' ) ); ?> |
