mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-14 04:14:36 +02:00
Dont use absolute paths in Attachment file generator.
This commit is contained in:
parent
b678f32b35
commit
72dc7334ec
1 changed files with 2 additions and 2 deletions
|
@ -44,13 +44,13 @@ class AttachmentFilenameService
|
|||
{
|
||||
//Return placeholder if a part does not have an attachment
|
||||
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/')) {
|
||||
return $this->package->getUrl(str_replace('%BASE%', '', $filename));
|
||||
}
|
||||
|
||||
//If no other method works, return placeholder
|
||||
return $this->package->getUrl('/img/part_placeholder.svg');
|
||||
return $this->package->getUrl('img/part_placeholder.svg');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue