diff options
| -rw-r--r-- | FisheyeGallery.php | 5 | ||||
| -rw-r--r-- | edit.php | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/FisheyeGallery.php b/FisheyeGallery.php index c64a01c..e505d9b 100644 --- a/FisheyeGallery.php +++ b/FisheyeGallery.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.102 2010/04/25 00:59:23 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.103 2010/04/28 04:48:15 spiderr Exp $ * @package fisheye */ @@ -641,6 +641,9 @@ class FisheyeGallery extends FisheyeBase { $joinSql .= " LEFT OUTER JOIN `".BIT_DB_PREFIX."fisheye_gallery_image_map` tfgim3 ON (tfgim3.`gallery_content_id`=lc.`content_id`) AND tfgim3.`item_content_id`=? "; $bindVars[] = $pListHash['contain_item']; $containVars[] = $pListHash['contain_item']; + } + if( isset( $pListHash['contain_item'] ) ) { + // contain item might have squeaked in as 0, clear our from pListHash unset( $pListHash['contain_item'] ); } foreach( $pListHash as $key=>$val ) { @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/edit.php,v 1.38 2010/04/24 16:32:29 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/edit.php,v 1.39 2010/04/28 04:48:15 spiderr Exp $ * @package fisheye * @subpackage functions */ @@ -109,12 +109,14 @@ $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, ); +if( $gContent->mContentId ) { + $getHash['contain_item'] = $gContent->mContentId; +} // modify listHash according to global preferences if( $gBitSystem->isFeatureActive( 'fisheye_show_all_to_admins' ) && $gBitUser->hasPermission( 'p_fisheye_admin' ) ) { unset( $getHash['user_id'] ); |
