add rw and r to events.php
This commit is contained in:
parent
619c62e681
commit
ec7ed3c882
|
@ -13,8 +13,8 @@ OC_JSON::checkAppEnabled('calendar');
|
||||||
|
|
||||||
$start = DateTime::createFromFormat('U', $_GET['start']);
|
$start = DateTime::createFromFormat('U', $_GET['start']);
|
||||||
$end = DateTime::createFromFormat('U', $_GET['end']);
|
$end = DateTime::createFromFormat('U', $_GET['end']);
|
||||||
if($_GET['calendar_id'] == 'shared'){
|
if($_GET['calendar_id'] == 'shared_rw' || $_GET['calendar_id'] == 'shared_r'){
|
||||||
$calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1);
|
$calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r');
|
||||||
$events = array();
|
$events = array();
|
||||||
foreach($calendars as $calendar){
|
foreach($calendars as $calendar){
|
||||||
$calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end);
|
$calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end);
|
||||||
|
@ -80,4 +80,4 @@ foreach($events as $event){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
OC_JSON::encodedPrint($return);
|
OC_JSON::encodedPrint($return);
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue