Fixed problem when return false instead of data, variable not change and enter a infinite bucle

This commit is contained in:
m-lopez-f 2015-02-11 09:54:44 +01:00
parent a1e432ca91
commit 16c0233434
3 changed files with 6 additions and 3 deletions

View File

@ -105,7 +105,7 @@ if (!empty ($module)) {
foreach ($module as $selected) {
$output = "";
$work_period = 120000;
$work_period = SECONDS_1DAY;
if ($work_period > $period) {
$work_period = $period;
}
@ -120,6 +120,7 @@ if (!empty ($module)) {
$arr = array ();
$arr["data"] = reporting_get_agentmodule_data_average ($selected, $work_period, $work_end);
if ($arr["data"] === false) {
$work_end = $work_end + $work_period;
continue;
}
$arr["module_name"] = modules_get_agentmodule_name ($selected);

View File

@ -104,7 +104,7 @@ if (!empty ($module)) {
foreach ($module as $selected) {
$output = "";
$work_period = 120000;
$work_period = SECONDS_1DAY;
if ($work_period > $period) {
$work_period = $period;
}
@ -119,6 +119,7 @@ if (!empty ($module)) {
$arr = array ();
$arr["data"] = reporting_get_agentmodule_data_average ($selected, $work_period, $work_end);
if ($arr["data"] === false) {
$work_end = $work_end + $work_period;
continue;
}
$arr["module_name"] = modules_get_agentmodule_name ($selected);
@ -162,4 +163,4 @@ if (!empty ($module)) {
else {
ui_print_error_message (__('No modules specified'));
}
?>
?>

View File

@ -137,6 +137,7 @@ if (!empty ($export_btn) && !empty ($module)) {
reporting_get_agentmodule_data_average(
$selected, $work_period, $work_end);
if ($arr["data"] === false) {
$work_end = $work_end + $work_period;
continue;
}
$arr["module_name"] = modules_get_agentmodule_name ($selected);