2012-01-18 Vanessa Gil <vanessa.gil@artica.es>

* operation/reporting/reporting_viewer.php: Check that the date range
	entered is correct.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5388 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-01-18 11:56:14 +00:00
parent 65fdb2b5f0
commit 76f4f1d68d
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-01-18 Vanessa Gil <vanessa.gil@artica.es>
* operation/reporting/reporting_viewer.php: Check that the date range
entered is correct.
2012-01-18 Vanessa Gil <vanessa.gil@artica.es>
* include/functions_agents.php

View File

@ -77,6 +77,12 @@ if ($config["pure"] == 0) {
ui_print_page_header (__('Reporting'). " &raquo; ". __('Custom reporting'). " - ".$report["name"], "images/reporting.png", false, "", false, $options);
if ($enable_init_date) {
if ($datetime_init > $datetime) {
ui_print_error_message ("Invalid date selected. Initial date must be before end date.");
}
}
$table->width = '99%';
$table->class = 'databox';
$table->style = array ();
@ -186,7 +192,9 @@ foreach ($contents as $content) {
// Calculate new inteval for all reports
if ($enable_init_date){
$datetime_init = strtotime ($date_init.' '.$time_init);
if ($datetime_init >= $datetime) {
$datetime_init = $date_init_less;
}
$new_interval = $report['datetime'] - $datetime_init;
$content['period'] = $new_interval;
}