diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-05-04 01:33:44 +0400 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-05-04 01:33:44 +0400 |
commit | 07ff1e723ae4fa3a0297b168ef2262e01a0a5e50 (patch) | |
tree | 569e77f0224828fd7955752c7fc01d0c9a79c666 | |
parent | 89c8316f8f07dea02351793f1edb4c85773a7331 (diff) |
Calendar: Fix repeating events
-rwxr-xr-x | apps/calendar/ajax/events.php | 2 | ||||
-rwxr-xr-x | apps/calendar/lib/app.php | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php index b84f5b4c608..b86620329e3 100755 --- a/apps/calendar/ajax/events.php +++ b/apps/calendar/ajax/events.php @@ -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); diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index e457aac2c78..f955c59603d 100755 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -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; } } |