Fixed bug in the construction of the name of the xml file
This commit is contained in:
parent
fb68f3f9b6
commit
a721eadcbd
|
@ -48,7 +48,7 @@ function createXMLData($agent, $agentModule, $time, $data) {
|
||||||
$data
|
$data
|
||||||
);
|
);
|
||||||
|
|
||||||
$file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . str_replace($time, " ", "_") . ".data";
|
$file_name = $config["remote_config"] . "/" . io_safe_output($agent["alias"]) . "." . strtotime($time) . ".data";
|
||||||
return (bool) @file_put_contents($file_name, $xml);
|
return (bool) @file_put_contents($file_name, $xml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ function mainInsertData() {
|
||||||
$utimestamp = strtotime($date . " " . $time) - get_fixed_offset();
|
$utimestamp = strtotime($date . " " . $time) - get_fixed_offset();
|
||||||
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
|
$timestamp = date(DATE_FORMAT . " " . TIME_FORMAT, $utimestamp);
|
||||||
$result = createXMLData($agent, $agentModule, $timestamp, $data);
|
$result = createXMLData($agent, $agentModule, $timestamp, $data);
|
||||||
|
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$done++;
|
$done++;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue