summaryrefslogtreecommitdiff
path: root/edit.php
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-01-01 16:22:40 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-01-01 16:22:40 +0000
commitb19b304435265caab26a050568ed346f985d7186 (patch)
treea8567496da437d749cfa096da0c2b4e2106c18bb /edit.php
parent8e6089cccc871427f64f0e17c69cafccded63671 (diff)
downloadfisheye-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.php17
1 files changed, 15 insertions, 2 deletions
diff --git a/edit.php b/edit.php
index 7c43ffb..7dda27d 100644
--- a/edit.php
+++ b/edit.php
@@ -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'] );