Skip to content

Commit

Permalink
Fix toArray method in Doc class
Browse files Browse the repository at this point in the history
- remove dead variables
- fix check for mime type
  • Loading branch information
beatrycze-volk committed Feb 3, 2023
1 parent 3cb54c6 commit 4d07ae1
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions Classes/Common/Doc.php
Original file line number Diff line number Diff line change
Expand Up @@ -1366,9 +1366,6 @@ public function toArray($uriBuilder, array $config = [])
'minPage' => $minPage
]
];
$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get(self::$extKey);
$fileGrpsImages = array_reverse(GeneralUtility::trimExplode(',', $extConf['fileGrpImages']));
$fileGrpsFulltext = GeneralUtility::trimExplode(',', $extConf['fileGrpFulltext']);

$allFiles = $this->getAllFiles();

Expand All @@ -1392,8 +1389,8 @@ public function toArray($uriBuilder, array $config = [])
}

// Only deliver static images via the internal PageViewProxy.
// (For IIP and IIIF, the viewer needs to build and access a separate metadata URL, see `getMetdadataURL`.)
if (in_array($fileGrp, $proxyFileGroups) && !in_array($mimetype, self::$nonProxyMimeTypes)) {
// (For IIP and IIIF, the viewer needs to build and access a separate metadata URL, see `getMetadataURL`.)
if (in_array($fileGrp, $proxyFileGroups) && !in_array($file['mimetype'], self::$nonProxyMimeTypes)) {
// Configure @action URL for form.
$file['url'] = $uriBuilder
->reset()
Expand Down

0 comments on commit 4d07ae1

Please sign in to comment.