summaryrefslogtreecommitdiff
path: root/includes/image_lookup_inc.php
diff options
context:
space:
mode:
authorLester Caine <lester@lsces.co.uk>2026-05-21 19:03:41 +0100
committerLester Caine <lester@lsces.co.uk>2026-05-21 19:03:41 +0100
commit29a585bd7b8290d7b54818594e8b5130bf453983 (patch)
tree3a92fa57463f64ffadcab36341532e6949560304 /includes/image_lookup_inc.php
parent00298bd4460d9f0cd1fc56d572489bdcb52492c4 (diff)
downloadfisheye-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-xincludes/image_lookup_inc.php3
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']);
}