mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-12 12:39:35 +00:00
Allow to filter for languages in conrad attachments
This commit is contained in:
parent
fa04fface3
commit
6d224a4a9f
2 changed files with 22 additions and 0 deletions
|
|
@ -200,6 +200,11 @@ readonly class ConradProvider implements InfoProviderInterface
|
|||
{
|
||||
$files = [];
|
||||
foreach ($productMedia['manuals'] as $manual) {
|
||||
//Filter out unwanted languages
|
||||
if (!empty($this->settings->attachmentLanguageFilter) && !in_array($manual['language'], $this->settings->attachmentLanguageFilter, true)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$files[] = new FileDTO($manual['fullUrl'], $manual['title'] . ' (' . $manual['language'] . ')');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue