diff --git a/includes/functions.php b/includes/functions.php index 84e95af1d..2b95c28ff 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -149,31 +149,7 @@ function interface_errors($rrd_file, $period = '-1d') { function getImage($device) { global $config; - $device['os'] = strtolower($device['os']); - - if ($device['icon'] && file_exists($config['html_dir'] . "/images/os/" . $device['icon'] . ".png")) { - $image = ''; - } - elseif (isset($config['os'][$device['os']]['icon']) && $config['os'][$device['os']]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$device['os']]['icon'] . ".png")) { - $image = ''; - } - else { - if (file_exists($config['html_dir'] . '/images/os/' . $device['os'] . '.png')) { - $image = ''; - } - if ($device['os'] == "linux") { - $features = strtolower(trim($device['features'])); - list($distro) = explode(" ", $features); - if (file_exists($config['html_dir'] . "/images/os/$distro" . ".png")) { - $image = ''; - } - } - if (empty($image)) { - $image = ''; - } - } - - return $image; + return ''; } function getImageSrc($device) { @@ -181,10 +157,10 @@ function getImageSrc($device) { $device['os'] = strtolower($device['os']); - if ($device['icon'] && file_exists($config['html_dir'] . "/images/os/" . $device['icon'] . ".png")) { + if (!empty($device['icon']) && file_exists($config['html_dir'] . "/images/os/" . $device['icon'] . ".png")) { $image = $config['base_url'] . '/images/os/' . $device['icon'] . '.png'; } - elseif ($config['os'][$device['os']]['icon'] && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$device['os']]['icon'] . ".png")) { + elseif (!empty($config['os'][$device['os']]['icon']) && file_exists($config['html_dir'] . "/images/os/" . $config['os'][$device['os']]['icon'] . ".png")) { $image = $config['base_url'] . '/images/os/' . $config['os'][$device['os']]['icon'] . '.png'; } else {