diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-21 19:03:41 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-21 19:03:41 +0100 |
| commit | 29a585bd7b8290d7b54818594e8b5130bf453983 (patch) | |
| tree | 3a92fa57463f64ffadcab36341532e6949560304 /includes/image_lookup_inc.php | |
| parent | 00298bd4460d9f0cd1fc56d572489bdcb52492c4 (diff) | |
| download | fisheye-29a585bd7b8290d7b54818594e8b5130bf453983.tar.gz fisheye-29a585bd7b8290d7b54818594e8b5130bf453983.tar.bz2 fisheye-29a585bd7b8290d7b54818594e8b5130bf453983.zip | |
Fix prev/next image navigation: call loadCurrentImage and use getAll not getAssoc
image_lookup_inc.php was never calling loadCurrentImage() so previous/next image
IDs were never populated. Also fixed loadCurrentImage to use getAll() instead of
getAssoc() — getAssoc keys by first column so numeric $rows[$i] indexing always
failed to find the current image.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes/image_lookup_inc.php')
| -rwxr-xr-x | includes/image_lookup_inc.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/image_lookup_inc.php b/includes/image_lookup_inc.php index 61e0bab..9c9823b 100755 --- a/includes/image_lookup_inc.php +++ b/includes/image_lookup_inc.php @@ -33,6 +33,9 @@ if( empty( $_REQUEST['gallery_id'] ) ) { // the image is considered the primary content, however the gallery is useful if( !empty($_REQUEST['gallery_id']) && is_numeric($_REQUEST['gallery_id']) ) { $gGallery = FisheyeGallery::lookup( $_REQUEST ); + if( is_object( $gGallery ) && $gGallery->isValid() ) { + $gGallery->loadCurrentImage( $gContent->mImageId ); + } $gBitSmarty->assign('gGallery', $gGallery); $gBitSmarty->assign('galleryId', $_REQUEST['gallery_id']); } |
