From c1354532bbeba7905f48fd75fc768f361d9bfe0f Mon Sep 17 00:00:00 2001 From: Nils Steinger Date: Tue, 22 Sep 2015 21:48:17 +0200 Subject: [PATCH] Removed duplicate code: Made getImage() use getImageSrc() --- includes/functions.php | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 84e95af1d..337445e0b 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) {