Dont use absolute paths in Attachment file generator.

This commit is contained in:
Jan Böhmer 2019-03-27 20:10:14 +01:00
parent b678f32b35
commit 72dc7334ec

View file

@ -44,13 +44,13 @@ class AttachmentFilenameService
{ {
//Return placeholder if a part does not have an attachment //Return placeholder if a part does not have an attachment
if (null == $filename) { if (null == $filename) {
return $this->package->getUrl('/img/part_placeholder.svg'); return $this->package->getUrl('img/part_placeholder.svg');
} }
if (false !== stripos($filename, '%BASE%/img/')) { if (false !== stripos($filename, '%BASE%/img/')) {
return $this->package->getUrl(str_replace('%BASE%', '', $filename)); return $this->package->getUrl(str_replace('%BASE%', '', $filename));
} }
//If no other method works, return placeholder //If no other method works, return placeholder
return $this->package->getUrl('/img/part_placeholder.svg'); return $this->package->getUrl('img/part_placeholder.svg');
} }
} }