From ff24fd67e2832117a679b8d7db3665f21eb6415f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 21 Nov 2010 16:23:26 +0000 Subject: [PATCH] New: Support "fulday" event in calendar module --- htdocs/comm/action/fiche.php | 4 ++-- htdocs/lib/xcal.lib.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/action/fiche.php b/htdocs/comm/action/fiche.php index 23460ee566c..13c03810ae8 100644 --- a/htdocs/comm/action/fiche.php +++ b/htdocs/comm/action/fiche.php @@ -95,7 +95,7 @@ if ($_POST["action"] == 'add_action') $datep2=dol_mktime( $fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], - 0, + $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); @@ -315,7 +315,7 @@ if (GETPOST("action") == 'update') $datep2=dol_mktime( $fulldayevent?'23':$_POST["p2hour"], $fulldayevent?'59':$_POST["p2min"], - 0, + $fulldayevent?'59':'0', $_POST["p2month"], $_POST["p2day"], $_POST["p2year"]); diff --git a/htdocs/lib/xcal.lib.php b/htdocs/lib/xcal.lib.php index f0c1318d7ec..01158e71aa1 100644 --- a/htdocs/lib/xcal.lib.php +++ b/htdocs/lib/xcal.lib.php @@ -201,7 +201,8 @@ function build_calfile($format='vcal',$title,$desc,$events_array,$outputfile) if ($fulldayevent) { $prefix=';VALUE=DATE'; - $enddatef = dol_print_date($enddate+1,'dayxcard',false); // Local time + $enddatef = dol_print_date($enddate+1,'dayxcard',false); + //$enddatef .= dol_print_date($enddate+1,'dayhourxcard',false); // Local time } fwrite($calfileh,"DTEND".$prefix.":".$enddatef."\n"); fwrite($calfileh,'STATUS:CONFIRMED'."\n");