mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fixed issue with using dir
This commit is contained in:
@@ -31,9 +31,10 @@ if($width > "500")
|
|||||||
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev \l'";
|
$rrd_options .= " COMMENT:'".substr(str_pad($unit_text, $descr_len+5),0,$descr_len+5)." RTT Loss SDev RTT\:SDev \l'";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$filename_dir = generate_smokeping_dir($device);
|
||||||
if($src['hostname'] == $config['own_hostname'])
|
if($src['hostname'] == $config['own_hostname'])
|
||||||
{
|
{
|
||||||
$filename_dir = generate_smokeping_dir($device);
|
$filename = $filename_dir . $device['hostname'].'.rrd';
|
||||||
if (!file_exists($filename_dir.$device['hostname'].'.rrd'))
|
if (!file_exists($filename_dir.$device['hostname'].'.rrd'))
|
||||||
{
|
{
|
||||||
// Try with dots in hostname replaced by underscores
|
// Try with dots in hostname replaced by underscores
|
||||||
|
|||||||
@@ -751,7 +751,7 @@ function get_smokeping_files($device) {
|
|||||||
global $config;
|
global $config;
|
||||||
if (isset($config['smokeping']['dir'])) {
|
if (isset($config['smokeping']['dir'])) {
|
||||||
$smokeping_files = array();
|
$smokeping_files = array();
|
||||||
$filename_dir = generate_smokeping_dir($device);
|
$smokeping_dir = generate_smokeping_dir($device);
|
||||||
if ($handle = opendir($smokeping_dir)) {
|
if ($handle = opendir($smokeping_dir)) {
|
||||||
while (false !== ($file = readdir($handle))) {
|
while (false !== ($file = readdir($handle))) {
|
||||||
if ($file != "." && $file != "..") {
|
if ($file != "." && $file != "..") {
|
||||||
|
|||||||
Reference in New Issue
Block a user