mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Linux distro images require feature field (#14301)
No reason to check them if feature is empty
This commit is contained in:
@@ -517,7 +517,7 @@ class Url
|
||||
|
||||
/**
|
||||
* @param string $os
|
||||
* @param string $feature
|
||||
* @param string|null $feature
|
||||
* @param string $icon
|
||||
* @param string $dir directory to search in (images/os/ or images/logos)
|
||||
* @return string
|
||||
@@ -527,7 +527,7 @@ class Url
|
||||
$possibilities = [$icon];
|
||||
|
||||
if ($os) {
|
||||
if ($os == 'linux') {
|
||||
if ($os == 'linux' && $feature) {
|
||||
// first, prefer the first word of $feature
|
||||
$distro = Str::before(strtolower(trim($feature)), ' ');
|
||||
$possibilities[] = "$distro.svg";
|
||||
|
Reference in New Issue
Block a user