From 88f94ce7ef0d5a922630b19f1f01d34ebf32a228 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Fri, 26 Nov 2010 12:44:18 +0000 Subject: [PATCH] 2010-11-26 Miguel de Dios * operation/agentes/exportdata.php: fixed the work_period to extract data when the default work_period is greater than period between the date to start and date to end. Fixes: #3119467 git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@3638 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 8 ++++++++ pandora_console/operation/agentes/exportdata.php | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index c1ed83c9b5..5a97c4b09f 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-11-26 Miguel de Dios + + * operation/agentes/exportdata.php: fixed the work_period to extract + data when the default work_period is greater than period between the + date to start and date to end. + + Fixes: #3119467 + 2010-11-26 Dario Rodriguez * extensions/plugin_registration.php: Fixed a bug related with html diff --git a/pandora_console/operation/agentes/exportdata.php b/pandora_console/operation/agentes/exportdata.php index 7aea7e46fb..d622242293 100644 --- a/pandora_console/operation/agentes/exportdata.php +++ b/pandora_console/operation/agentes/exportdata.php @@ -171,12 +171,15 @@ if (!empty ($export_btn) && !empty ($module)) { foreach ($module as $selected) { $output = ""; - $work_period = 120000; + $work_period = 120000; + if ($work_period > $period) { + $work_period = $period; + } $work_end = $end - $period + $work_period; //Buffer to get data, anyway this will report a memory exhaustin - while ( $work_end < $end) { + while ($work_end <= $end) { $work_end = $work_end + $work_period; $data = array (); // Reinitialize array for each module chunk