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/classes/FisheyeGallery.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/classes/FisheyeGallery.php')
| -rwxr-xr-x | includes/classes/FisheyeGallery.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/classes/FisheyeGallery.php b/includes/classes/FisheyeGallery.php index c321d99..1c89b34 100755 --- a/includes/classes/FisheyeGallery.php +++ b/includes/classes/FisheyeGallery.php @@ -187,7 +187,7 @@ class FisheyeGallery extends FisheyeBase { INNER JOIN `".BIT_DB_PREFIX."liberty_files` lf ON ( lf.`file_id`=la.`foreign_id` ) WHERE fgim.`gallery_content_id` = ? ORDER BY fgim.`item_position`, fi.`content_id` "; - if( $rows = $this->mDb->getAssoc($query, [ $this->mContentId ] ) ) { + if( $rows = $this->mDb->getAll($query, [ $this->mContentId ] ) ) { $tempImage = new FisheyeImage(); for( $i = 0; $i < count( $rows ); $i++ ) { if( $rows[$i]['image_id'] == $pCurrentImageId ) { |
