diff options
| author | Christian Fowler <spider@viovio.com> | 2007-10-03 16:01:20 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2007-10-03 16:01:20 +0000 |
| commit | c8121bd419204e7d29c6fdcbdc65bdbd82c3909b (patch) | |
| tree | 654e22db4b567ed11233118639ab13c2da242416 /FisheyeGallery.php | |
| parent | 0ce1e4876cfcafaf2f086c4f19b55d40201b72f9 (diff) | |
| download | fisheye-c8121bd419204e7d29c6fdcbdc65bdbd82c3909b.tar.gz fisheye-c8121bd419204e7d29c6fdcbdc65bdbd82c3909b.tar.bz2 fisheye-c8121bd419204e7d29c6fdcbdc65bdbd82c3909b.zip | |
handle gallery image order with no positions set
Diffstat (limited to 'FisheyeGallery.php')
| -rw-r--r-- | FisheyeGallery.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/FisheyeGallery.php b/FisheyeGallery.php index 48533ad..67131a3 100644 --- a/FisheyeGallery.php +++ b/FisheyeGallery.php @@ -1,6 +1,6 @@ <?php /** - * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.67 2007/09/21 01:08:20 spiderr Exp $ + * @version $Header: /cvsroot/bitweaver/_bit_fisheye/FisheyeGallery.php,v 1.68 2007/10/03 16:01:20 spiderr Exp $ * @package fisheye */ @@ -194,8 +194,11 @@ class FisheyeGallery extends FisheyeBase { WHERE gallery_content_id=? ORDER BY floor(item_position)"; $mantissa = $this->mDb->getOne( $query, array( $this->mContentId ), 1, ($pPage - 1) ); - $whereSql .= " AND floor(item_position)=? "; - array_push( $bindVars, $mantissa ); + // gallery image order with no positions set will have NULL mantissa, and all images will be shown + if( !is_null( $mantissa ) ) { + $whereSql .= " AND floor(item_position)=? "; + array_push( $bindVars, $mantissa ); + } } else { $rows = $this->getField( 'rows_per_page' ) * $this->getField( 'cols_per_page' ); $offset = $rows * ($pPage - 1); |
