diff options
| author | Lester Caine <lester@lsces.co.uk> | 2026-05-21 17:46:35 +0100 |
|---|---|---|
| committer | Lester Caine <lester@lsces.co.uk> | 2026-05-21 17:46:35 +0100 |
| commit | 4382a204c4a1119e8183129826f21c55cf890c00 (patch) | |
| tree | 121305f21f38d2b9eeb199aa968f7f18fb7ae960 /includes | |
| parent | 0ce4de7b6d05f675c8945ebb3af846f38272ef8b (diff) | |
| download | fisheye-4382a204c4a1119e8183129826f21c55cf890c00.tar.gz fisheye-4382a204c4a1119e8183129826f21c55cf890c00.tar.bz2 fisheye-4382a204c4a1119e8183129826f21c55cf890c00.zip | |
Fix breadcrumb depth and dedup nav across gallery views
getBreadcrumbLinks now walks the full gallery hierarchy recursively
instead of only one level up, so deep paths like Projects > Cadogan
Gardens > Source Material appear in full. Inline nav blocks in
galleriffic, simple_list and auto_flow replaced with gallery_nav.tpl
include (matching fixed_grid). User/Galleries editor link in
gallery_nav.tpl now guarded by hasUpdatePermission.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'includes')
| -rwxr-xr-x | includes/classes/FisheyeBase.php | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/includes/classes/FisheyeBase.php b/includes/classes/FisheyeBase.php index f4b267c..7b29b18 100755 --- a/includes/classes/FisheyeBase.php +++ b/includes/classes/FisheyeBase.php @@ -158,9 +158,26 @@ not ready for primetime //$ret['fisheye'] = $gBitSystem->getConfig('site_title'); $ret = []; if( !$this->getField( 'gallery_path' ) ) { - if( $this->isValid() && $parents = $this->getParentGalleries() ) { - $gal = current( $parents ); - $this->setGalleryPath( '/'.$gal['gallery_id'] ); + if( $this->isValid() ) { + $pathIds = []; + $currentContentId = $this->mContentId; + for( $depth = 0; $depth < 10; $depth++ ) { + $parents = $this->getParentGalleries( $currentContentId ); + if( !$parents ) break; + $found = false; + foreach( $parents as $galleryId => $galleryData ) { + if( is_array( $galleryData ) && isset( $galleryData['content_id'] ) ) { + array_unshift( $pathIds, $galleryId ); + $currentContentId = $galleryData['content_id']; + $found = true; + break; + } + } + if( !$found ) break; + } + if( $pathIds ) { + $this->setGalleryPath( '/'.implode( '/', $pathIds ) ); + } } } if( $this->getField( 'gallery_path' ) ) { |
