mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-16 16:09:31 +00:00
Allow to autodetermine categories and pathes from info provider import using a full path
This fixes issue #1113
This commit is contained in:
parent
e1090d46e3
commit
15243dbcc8
1 changed files with 8 additions and 0 deletions
|
|
@ -243,6 +243,14 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit
|
||||||
return $result[0];
|
return $result[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//If the name contains category delimiters like ->, try to find the element by its full path
|
||||||
|
if (str_contains($name, '->')) {
|
||||||
|
$tmp = $this->getEntityByPath($name, '->');
|
||||||
|
if (count($tmp) > 0) {
|
||||||
|
return $tmp[count($tmp) - 1];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//If we find nothing, return null
|
//If we find nothing, return null
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue