fix add to listevents.php

use of dol_mktime + check dates order
This commit is contained in:
Bahfir Abbes 2015-05-17 16:13:50 +01:00
parent ffc5284a78
commit 1ba2240553

View File

@ -63,8 +63,7 @@ $search_ua = GETPOST("search_ua");
$date_start=dol_mktime(0,0,0,$_REQUEST["date_startmonth"],$_REQUEST["date_startday"],$_REQUEST["date_startyear"]);
$date_end=dol_mktime(23,59,59,$_REQUEST["date_endmonth"],$_REQUEST["date_endday"],$_REQUEST["date_endyear"]);
// checks: if date_start<0 then date_start=01/01/1970 and if date_start>date_end then date_end=date_start + 24 hours
if($date_start<0) $date_start=0;
// checks:if date_start>date_end then date_end=date_start + 24 hours
if($date_start>$date_end) $date_end=$date_start+86400;
$params = "&amp;search_code=$search_code&amp;search_ip=$search_ip&amp;search_user=$search_user&amp;search_desc=$search_desc&amp;search_ua=$search_ua";