Calendar: Fix repeating events
This commit is contained in:
parent
89c8316f8f
commit
07ff1e723a
|
@ -19,6 +19,6 @@ $events = OC_Calendar_App::getrequestedEvents($_GET['calendar_id'], $start, $end
|
|||
|
||||
$output = array();
|
||||
foreach($events as $event){
|
||||
$output[] = OC_Calendar_App::generateEventOutput($event, $start, $end);
|
||||
$output = $output + OC_Calendar_App::generateEventOutput($event, $start, $end);
|
||||
}
|
||||
OCP\JSON::encodedPrint($output);
|
||||
|
|
|
@ -392,6 +392,7 @@ class OC_Calendar_App{
|
|||
}
|
||||
}
|
||||
|
||||
$return = array();
|
||||
if($event['repeating'] == 1){
|
||||
$duration = (double) $end_dt->format('U') - (double) $start_dt->format('U');
|
||||
$r = new When();
|
||||
|
@ -422,6 +423,7 @@ class OC_Calendar_App{
|
|||
$output['start'] = $result->format('Y-m-d H:i:s');
|
||||
$output['end'] = date('Y-m-d H:i:s', $result->format('U') + $duration);
|
||||
}
|
||||
$return[] = $output;
|
||||
}
|
||||
}else{
|
||||
if($output['allDay'] == true){
|
||||
|
@ -432,7 +434,8 @@ class OC_Calendar_App{
|
|||
$output['start'] = $start_dt->format('Y-m-d H:i:s');
|
||||
$output['end'] = $end_dt->format('Y-m-d H:i:s');
|
||||
}
|
||||
$return[] = $output;
|
||||
}
|
||||
return $output;
|
||||
return $return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue