Skip to content

Commit

Permalink
fix add to listevents.php
Browse files Browse the repository at this point in the history
use of dol_mktime + check dates order
  • Loading branch information
bafbes committed May 17, 2015
1 parent ffc5284 commit 1ba2240
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions htdocs/admin/tools/listevents.php
Expand Up @@ -63,8 +63,7 @@
$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";
Expand Down

0 comments on commit 1ba2240

Please sign in to comment.