mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 16:24:54 +02:00
Fixed problems with export data when type equals csv, export less data Tiquet: #1756
(cherry picked from commit a6807034eb737a5e2de2cb4f2fbdad2f7677d54e)
This commit is contained in:
parent
8968505812
commit
85eda328a4
@ -112,7 +112,7 @@ if (!empty ($module)) {
|
|||||||
|
|
||||||
$work_end = $end - $period + $work_period;
|
$work_end = $end - $period + $work_period;
|
||||||
//Buffer to get data, anyway this will report a memory exhaustin
|
//Buffer to get data, anyway this will report a memory exhaustin
|
||||||
|
$flag_last_time_slice = false;
|
||||||
while ($work_end <= $end) {
|
while ($work_end <= $end) {
|
||||||
|
|
||||||
$data = array (); // Reinitialize array for each module chunk
|
$data = array (); // Reinitialize array for each module chunk
|
||||||
@ -154,7 +154,18 @@ if (!empty ($module)) {
|
|||||||
$output = "";
|
$output = "";
|
||||||
unset($data);
|
unset($data);
|
||||||
unset($data_single);
|
unset($data_single);
|
||||||
$work_end = $work_end + $work_period;
|
if ($flag_last_time_slice)
|
||||||
|
break;
|
||||||
|
|
||||||
|
if (($work_end + $work_period) > $end) {
|
||||||
|
// Get the last timelapse
|
||||||
|
$work_period = $end - $work_end;
|
||||||
|
$work_end = $end;
|
||||||
|
$flag_last_time_slice = true;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$work_end = $work_end + $work_period;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
unset ($output);
|
unset ($output);
|
||||||
$output = "";
|
$output = "";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user