Skip to content

Commit

Permalink
fix: project path; render absolute uri
Browse files Browse the repository at this point in the history
  • Loading branch information
Carsten Walther committed Mar 14, 2022
1 parent a362008 commit debfb14
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Classes/Resource/FileRepository.php
Expand Up @@ -185,7 +185,7 @@ private function prepareList(array $references) : array
try {
$fileReferenceObject = $this->factory->getFileReferenceObject($referenceUid);
$fileExtension = $fileReferenceObject->getExtension();
if ($fileReferenceObject->isMissing() === false && in_array($fileExtension, $this->extensions, true) && file_exists(Environment::getProjectPath() . $fileReferenceObject->getPublicUrl()) === true) {
if ($fileReferenceObject->isMissing() === false && in_array($fileExtension, $this->extensions, true) && file_exists(Environment::getPublicPath() . $fileReferenceObject->getPublicUrl()) === true) {
if ($this->showEmpty === true || ($this->showEmpty === false && !empty($fileReferenceObject->getProperty('copyright')))) {
$itemList[] = [
'file' => $fileReferenceObject->getOriginalFile(),
Expand Down
2 changes: 1 addition & 1 deletion Resources/Private/Partials/Item.html
@@ -1,7 +1,7 @@
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{resource.file}">
<figure class="copyright">
<f:image treatIdAsReference="TRUE" image="{resource.file}" width="200c" height="133c" />
<f:image treatIdAsReference="TRUE" image="{resource.file}" width="200c" height="133c" absolute="1"/>
<figcaption>
<f:if condition="{resource.file.properties.copyright}">
<f:then>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
@@ -1,7 +1,7 @@
{
"name": "walther/image_copyright",
"type": "typo3-cms-extension",
"version": "11.5.1",
"version": "11.5.2",
"minimum-stability": "stable",
"description": "Add copyright informations of all images to your site",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion ext_emconf.php
Expand Up @@ -8,7 +8,7 @@
'title' => 'Image Copyright',
'description' => 'Image based copyrights',
'category' => 'misc',
'version' => '11.5.1',
'version' => '11.5.2',
'state' => 'stable',
'uploadfolder' => 0,
'createDirs' => '',
Expand Down

0 comments on commit debfb14

Please sign in to comment.