Updated to use Pauls code

This commit is contained in:
laf
2015-07-13 09:37:48 +01:00
parent e356d80141
commit 451c3a0981

View File

@@ -775,16 +775,12 @@ function get_smokeping_files($device) {
return $smokeping_files;
}
function generate_smokeping_file($device,$file) {
function generate_smokeping_file($device,$file='') {
global $config;
if ($config['smokeping']['integration'] === true) {
$response = $config['smokeping']['dir'] .'/'. $device['type'] .'/';
return $config['smokeping']['dir'] .'/'. $device['type'] .'/' . $file;
} else {
$response = $config['smokeping']['dir'] . '/';
return $config['smokeping']['dir'] . '/' . $file;
}
if (!empty($file)) {
$response = $response . $file;
}
return $response;
}