From 8400962130ce59c57d450347c6db6843ff8c9a19 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 29 Feb 2016 11:20:03 -0600 Subject: [PATCH 1/2] Fix os images with subdirectories in url Fix #3118 Obviously, the answer to the question in the code is yes --- includes/functions.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index dcaa363e2..191ca12ac 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -153,8 +153,7 @@ function getImage($device) { } function getImageSrc($device) { - // is base_url needed? - return '/images/os/' . getImageName($device) . '.png'; + return $config['base_url'] . '/images/os/' . getImageName($device) . '.png'; } function getImageName($device, $use_database=true) { From ade3c815705b491fca91dd4c24b5f2a7e2b2e1ae Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Mon, 29 Feb 2016 11:26:03 -0600 Subject: [PATCH 2/2] Need global $config to be able to access it. --- includes/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/functions.php b/includes/functions.php index 191ca12ac..a1540a48a 100644 --- a/includes/functions.php +++ b/includes/functions.php @@ -147,12 +147,12 @@ function interface_errors($rrd_file, $period = '-1d') { } function getImage($device) { - global $config; - return ''; } function getImageSrc($device) { + global $config; + return $config['base_url'] . '/images/os/' . getImageName($device) . '.png'; }