mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-09-23 06:39:18 +00:00
Switch freebusy style to match GET url response.
This commit is contained in:
parent
67801057d1
commit
4d3f233756
@ -64,11 +64,13 @@ foreach( $busy_tentative AS $k => $v ) {
|
|||||||
while ( $date = $rrule->GetNext() ) {
|
while ( $date = $rrule->GetNext() ) {
|
||||||
if ( ! $date->GreaterThan($fbq_start) ) continue;
|
if ( ! $date->GreaterThan($fbq_start) ) continue;
|
||||||
if ( $date->GreaterThan($fbq_end) ) break;
|
if ( $date->GreaterThan($fbq_end) ) break;
|
||||||
$freebusy .= sprintf("FREEBUSY;FBTYPE=BUSY-TENTATIVE:%s/%s\n", $date->Render('Ymd\THis'), $duration );
|
$todate = clone($date);
|
||||||
|
$todate->AddDuration($duration);
|
||||||
|
$freebusy .= sprintf("FREEBUSY;FBTYPE=BUSY-TENTATIVE:%s/%s\n", $date->Render('Ymd\THis'), $todate->Render('Ymd\THis') );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$freebusy .= sprintf("FREEBUSY;FBTYPE=BUSY-TENTATIVE:%s/%s\n", $start->Render('Ymd\THis'), $duration );
|
$freebusy .= sprintf("FREEBUSY;FBTYPE=BUSY-TENTATIVE:%s/%s\n", $start->Render('Ymd\THis'), $v->finish );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -80,11 +82,13 @@ foreach( $busy AS $k => $v ) {
|
|||||||
while ( $date = $rrule->GetNext() ) {
|
while ( $date = $rrule->GetNext() ) {
|
||||||
if ( ! $date->GreaterThan($fbq_start) ) continue;
|
if ( ! $date->GreaterThan($fbq_start) ) continue;
|
||||||
if ( $date->GreaterThan($fbq_end) ) break;
|
if ( $date->GreaterThan($fbq_end) ) break;
|
||||||
$freebusy .= sprintf("FREEBUSY:%s/%s\n", $date->Render('Ymd\THis'), $duration );
|
$todate = clone($date);
|
||||||
|
$todate->AddDuration($duration);
|
||||||
|
$freebusy .= sprintf("FREEBUSY:%s/%s\n", $date->Render('Ymd\THis'), $todate->Render('Ymd\THis') );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$freebusy .= sprintf("FREEBUSY:%s/%s\n", $start->Render('Ymd\THis'), $duration );
|
$freebusy .= sprintf("FREEBUSY:%s/%s\n", $start->Render('Ymd\THis'), $v->finish );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user