diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2006-01-26 10:12:45 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2006-01-26 10:12:45 +0000 |
| commit | f080097541a59934a82fa0844ec83e80f72819da (patch) | |
| tree | f9fb089b6653e266d0ddf23642090d0c8da6700c /list.php | |
| parent | 2034d4e8b5866c7c2148aecda5933f57253f4a21 (diff) | |
| download | pigeonholes-f080097541a59934a82fa0844ec83e80f72819da.tar.gz pigeonholes-f080097541a59934a82fa0844ec83e80f72819da.tar.bz2 pigeonholes-f080097541a59934a82fa0844ec83e80f72819da.zip | |
load structure only when needed
Diffstat (limited to 'list.php')
| -rw-r--r-- | list.php | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -3,7 +3,7 @@ * $Header * * @author xing <xing@synapse.plus.com> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ * @package pigeonholes * @subpackage functions */ @@ -26,13 +26,14 @@ $pigeonList = $gContent->getList( $listHash ); // set up structure related stuff if( !empty( $pigeonList ) ) { foreach( $pigeonList as $key => $pigeonhole ) { - $gStructure = new LibertyStructure( $pigeonhole['root_structure_id'] ); - $gStructure->load(); - $pigeonList[$key]['subtree'] = $gStructure->getSubTree( $gStructure->mStructureId ); + if( empty( $gStructure ) ) { + $gStructure = new LibertyStructure(); + } + $pigeonList[$key]['subtree'] = $gStructure->getSubTree( $pigeonhole['root_structure_id'] ); } $gBitSmarty->assign( 'pigeonList', $pigeonList ); } $gBitSmarty->assign( 'listInfo', $listHash['control'] ); -$gBitSystem->display( 'bitpackage:pigeonholes/list.tpl', tra( 'List Pigeonholes' ) ); +$gBitSystem->display( 'bitpackage:pigeonholes/list.tpl', tra( 'List Categories' ) ); ?> |
