Skip to content

Commit

Permalink
fix csv_settings
Browse files Browse the repository at this point in the history
  • Loading branch information
TrystanLea committed Nov 16, 2019
1 parent 44a18b7 commit 3736a74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions Modules/feed/feed_model.php
Expand Up @@ -777,15 +777,15 @@ public function csv_export_multi($feedids,$start,$end,$outinterval,$datetimeform
if ($firstline) {
$dataline[$feedid] = $data[$feedid];
} else if (isset($data[$feedid])) {
$dataline[$feedid] = number_format((float)$data[$feedid],$this->settings['decimal_places'],$this->settings['decimal_place_separator'],'');
$dataline[$feedid] = number_format((float)$data[$feedid],$this->settings['csv_decimal_places'],$this->settings['csv_decimal_place_separator'],'');
} else {
$dataline[$feedid] = "";
}
}
if (!$firstline) {
$time = $helperclass->getTimeZoneFormated($time,$usertimezone);
}
fputcsv($fh, array($time)+$dataline,$this->settings['field_separator']);
fputcsv($fh, array($time)+$dataline,$this->settings['csv_field_separator']);
$firstline = false;
}
fclose($fh);
Expand Down
6 changes: 3 additions & 3 deletions default-settings.ini
Expand Up @@ -95,13 +95,13 @@ max_datapoints = 8928
; NOTE: don't make $csv_decimal_place_separator == $csv_field_separator
; Adjust as appropriate for your location
; number of decimal places
decimal_places = 2
csv_decimal_places = 2

; decimal place separator
decimal_place_separator = "."
csv_decimal_place_separator = "."

; field separator
field_separator = ","
csv_field_separator = ","

; Max csv download size in MB
csv_downloadlimit_mb = 25
Expand Down

0 comments on commit 3736a74

Please sign in to comment.