Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
sc979: take feedbacks into account #2
Browse files Browse the repository at this point in the history
  • Loading branch information
adr-mo committed Jun 10, 2020
1 parent d0ada3d commit ce7eab3
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions www/include/views/graphs/exportData/ExportCSVServiceData.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ function get_error($str)
header("Content-disposition: filename=" . $index . ".csv");
}

if ($start === false && $end === false) {
die('Start or end time is not consistent or not an integer');
}

$listMetric = array();
$datas = array();
$listEmptyMetric = array();
Expand All @@ -138,9 +142,6 @@ function get_error($str)
while ($indexData = $stmt->fetch(\PDO::FETCH_ASSOC)) {
$listMetric[$indexData['metric_id']] = $indexData['metric_name'];
$listEmptyMetric[$indexData['metric_id']] = '';
if ($start === false && $end === false) {
die('Start or end time is not consistent or not an integer');
}
$stmt2 = $pearDBO->prepare(
"SELECT ctime, `value` FROM data_bin WHERE id_metric = :metricId " .
"AND ctime >= :start AND ctime < :end"
Expand Down

0 comments on commit ce7eab3

Please sign in to comment.