mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-28 00:04:04 +02:00
Libraries: Only attempt a partial match if the library name contains a slash
fixes #4971 (cherry picked from commit 8837fea7a40f7b8395b72e4a76303eed2e794bf3)
This commit is contained in:
parent
3a28e42046
commit
4efefc1877
@ -80,7 +80,7 @@ class Libraries implements IteratorAggregate
|
||||
$libraryName = $library->getName();
|
||||
if ($libraryName === $name) {
|
||||
return $library;
|
||||
} elseif (explode('/', $libraryName)[1] === $name) {
|
||||
} elseif (strpos($libraryName, '/') !== false && explode('/', $libraryName)[1] === $name) {
|
||||
// Also return libs which only partially match
|
||||
$candidate = $library;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user