Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
svewap committed Dec 23, 2024
1 parent eb230e6 commit d8f0fd0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions Classes/Controller/GalleryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,8 @@ protected function initializeView($view)
*/
public function listAction(int $offset = 0): ResponseInterface
{

$collectionUids = (trim($this->settings['fileCollection']) !== '') ? explode(',', $this->settings['fileCollection']) : [];
if (isset($this->settings['inlineFileCollection'])) {
$collectionUids = (trim($this->settings['fileCollection'] ?? '') !== '') ? explode(',', $this->settings['fileCollection']) : [];
if (($this->settings['inlineFileCollection'] ?? '') !== '') {
$collectionUids = array_merge($collectionUids, explode(',', $this->settings['inlineFileCollection']));
}
$cObj = $this->request->getAttribute('currentContentObject');
Expand All @@ -72,11 +71,11 @@ public function listAction(int $offset = 0): ResponseInterface

if ($this->request->hasArgument('galleryUID')) {
$gallery = [$this->request->getArgument('galleryUID')];
$mediaItems = $this->fileCollectionService->getFileObjectsFromCollection($gallery, $this->settings['order']);
$mediaItems = $this->fileCollectionService->getFileObjectsFromCollection($gallery, $this->settings['order'] ?? 'asc');
$collection = $this->fileCollectionRepository->findByUid($this->request->getArgument('galleryUID'));
$showBackToGallerySelectionLink = true;
} else {
$mediaItems = $this->fileCollectionService->getFileObjectsFromCollection($collectionUids, $this->settings['order']);
$mediaItems = $this->fileCollectionService->getFileObjectsFromCollection($collectionUids, $this->settings['order'] ?? 'asc');
}

if ($collection === null && count($collectionUids) === 1) {
Expand Down

0 comments on commit d8f0fd0

Please sign in to comment.