diff options
| author | Max Kremmel <xing@synapse.plus.com> | 2007-01-01 16:22:40 +0000 |
|---|---|---|
| committer | Max Kremmel <xing@synapse.plus.com> | 2007-01-01 16:22:40 +0000 |
| commit | b19b304435265caab26a050568ed346f985d7186 (patch) | |
| tree | a8567496da437d749cfa096da0c2b4e2106c18bb /edit.php | |
| parent | 8e6089cccc871427f64f0e17c69cafccded63671 (diff) | |
| download | fisheye-b19b304435265caab26a050568ed346f985d7186.tar.gz fisheye-b19b304435265caab26a050568ed346f985d7186.tar.bz2 fisheye-b19b304435265caab26a050568ed346f985d7186.zip | |
adjust getList parameters according to perissions and settings
Diffstat (limited to 'edit.php')
| -rw-r--r-- | edit.php | 17 |
1 files changed, 15 insertions, 2 deletions
@@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/edit.php,v 1.18 2006/12/23 09:29:04 squareing Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/edit.php,v 1.19 2007/01/01 16:22:40 squareing Exp $ * @package fisheye * @subpackage functions */ @@ -98,7 +98,20 @@ $gBitSmarty->assign( 'loadAjax', 'prototype' ); $gallery = $gContent->getParentGalleries(); $gBitSmarty->assign_by_ref( 'parentGalleries', $gallery ); -$getHash = array( 'user_id' => $gBitUser->mUserId, 'contain_item' => $gContent->mContentId, 'max_records' => -1, 'no_thumbnails' => TRUE, 'sort_mode'=>'title_asc', 'show_empty'=>TRUE ); +$getHash = array( + 'user_id' => $gBitUser->mUserId, + 'contain_item' => $gContent->mContentId, + 'max_records' => -1, + 'no_thumbnails' => TRUE, + 'sort_mode' => 'title_asc', + 'show_empty' => TRUE, +); +// modify listHash according to global preferences +if( $gBitSystem->isFeatureActive( 'fisheye_show_all_to_admins' ) && $gBitUser->hasPermission( 'p_fisheye_admin' ) ) { + unset( $getHash['user_id'] ); +} elseif( $gBitSystem->isFeatureActive( 'fisheye_show_public_on_upload' ) ) { + $getHash['show_public'] = TRUE; +} $galleryList = $gContent->getList( $getHash ); $gBitSmarty->assign_by_ref( 'galleryList', $galleryList['data'] ); |
