New: Support "fulday" event in calendar module

This commit is contained in:
Laurent Destailleur 2010-11-21 16:23:26 +00:00
parent e3f455899b
commit ff24fd67e2
2 changed files with 4 additions and 3 deletions

View File

@ -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"]);

View File

@ -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");