mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 18:34:32 +02:00
Only do the german->english footprint conversion if the footprint contains german text
Otherwise this had broken the viewing of passive components.
This commit is contained in:
parent
ddd8a66024
commit
0b519c2b7f
2 changed files with 8 additions and 0 deletions
|
@ -366,6 +366,11 @@ class AttachmentPathResolver
|
|||
|
||||
public function convertOldFootprintPath(string $old_path): string
|
||||
{
|
||||
//Only do the conversion if it contains a german string (meaning it has one of the four former base folders in its path)
|
||||
if (!preg_match('/%FOOTPRINTS%\/(Passiv|Aktiv|Akustik|Elektromechanik|Optik)\//', $old_path)) {
|
||||
return $old_path;
|
||||
}
|
||||
|
||||
return strtr($old_path, self::OLD_FOOTPINT_PATH_REPLACEMENT);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue