summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Fowler <spider@viovio.com>2009-08-28 15:48:25 +0000
committerChristian Fowler <spider@viovio.com>2009-08-28 15:48:25 +0000
commit4d5cce2552ea07a9745d07db61d483f26cad3c7e (patch)
treec6f79a430527bce89bc78b074d7423145e686c33
parentd8f4d1d499b4e973cb7cb371fe15ec32e2600420 (diff)
downloadfisheye-4d5cce2552ea07a9745d07db61d483f26cad3c7e.tar.gz
fisheye-4d5cce2552ea07a9745d07db61d483f26cad3c7e.tar.bz2
fisheye-4d5cce2552ea07a9745d07db61d483f26cad3c7e.zip
reverse out listBoxContents, better checking of moduleParams
-rw-r--r--templates/center_list_galleries.php38
1 files changed, 4 insertions, 34 deletions
diff --git a/templates/center_list_galleries.php b/templates/center_list_galleries.php
index 65072c9..a507326 100644
--- a/templates/center_list_galleries.php
+++ b/templates/center_list_galleries.php
@@ -12,10 +12,10 @@ if( !empty( $module_params['gallery_id'] ) && is_numeric( $module_params['galler
}*/
if ($gQueryUserId) {
$listHash['user_id'] = $gQueryUserId;
-} elseif( !empty( $module_params['user_id'] ) && is_numeric( $module_params['user_id'] ) ) {
+} elseif( !empty( $module_params['user_id'] ) && BitBase::verifyId( $module_params['user_id'] ) ) {
$listHash['user_id'] = $module_params['user_id'];
}
-if( !empty( $module_params['contain_item'] ) && is_numeric( $module_params['contain_item'] ) ) {
+if( !empty( $module_params['contain_item'] ) && BitBase::verifyId( $module_params['contain_item'] ) ) {
$listHash['contain_item'] = $module_params['contain_item'];
}
if ( !empty( $module_params['sort_mode'] ) ) {
@@ -33,39 +33,9 @@ if( !empty( $module_params['max_records'] ) ){
}
-
$galleryList = $gFisheyeGallery->getList( $listHash );
-if( !empty( $moduleParams['module_params']['columns'] ) ){
- // support for tabled listing of galleries
- $columnCount = $moduleParams['module_params']['columns'];
-
- $num_gallery_count = count( $galleryList );
-
- if( $num_gallery_count < $columnCount ) {
- $col_width = 100/$num_gallery_count;
- } else {
- $col_width = 100/$columnCount;
- }
-
- $gBitSmarty->assign( 'listColWidth', $col_width );
-
- $row = 0;
- $col = 0;
-
- foreach( $galleryList as $gallery ) {
- $listBoxContents[$row][$col] = $gallery;
- $col ++;
- if ($col > ($columnCount - 1)) {
- $col = 0;
- $row ++;
- }
- }
-
- $gBitSmarty->assign_by_ref( 'listBoxContents', $listBoxContents );
-} else {
- // support for div/ul/li listing of galleries
- $gBitSmarty->assign_by_ref( 'galleryList', $galleryList );
-}
+// support for div/ul/li listing of galleries
+$gBitSmarty->assign_by_ref( 'galleryList', $galleryList );