diff options
author | Georg Ehrke <ownclouddev@georgswebsite.de> | 2012-02-20 11:35:19 +0100 |
---|---|---|
committer | Georg Ehrke <ownclouddev@georgswebsite.de> | 2012-02-20 11:35:19 +0100 |
commit | ec7ed3c88228063af3221ccbdfe9add28eac0422 (patch) | |
tree | 3e22ec8090d7f4a6b2df7be862fdbcd729f0fa0f /apps/calendar/ajax/events.php | |
parent | 619c62e681307b769af4aca56acb117de9768995 (diff) | |
download | nextcloud-server-ec7ed3c88228063af3221ccbdfe9add28eac0422.tar.gz nextcloud-server-ec7ed3c88228063af3221ccbdfe9add28eac0422.zip |
add rw and r to events.php
Diffstat (limited to 'apps/calendar/ajax/events.php')
-rwxr-xr-x | apps/calendar/ajax/events.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/calendar/ajax/events.php b/apps/calendar/ajax/events.php index 96ee6775f7f..1747b2ac1a8 100755 --- a/apps/calendar/ajax/events.php +++ b/apps/calendar/ajax/events.php @@ -13,8 +13,8 @@ OC_JSON::checkAppEnabled('calendar'); $start = DateTime::createFromFormat('U', $_GET['start']); $end = DateTime::createFromFormat('U', $_GET['end']); -if($_GET['calendar_id'] == 'shared'){ - $calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1); +if($_GET['calendar_id'] == 'shared_rw' || $_GET['calendar_id'] == 'shared_r'){ + $calendars = OC_Calendar_Share::allSharedwithuser(OC_USER::getUser(), OC_Calendar_Share::CALENDAR, 1, ($_GET['calendar_id'] == 'shared_rw')?'rw':'r'); $events = array(); foreach($calendars as $calendar){ $calendarevents = OC_Calendar_Object::allInPeriod($calendar['calendarid'], $start, $end); @@ -80,4 +80,4 @@ foreach($events as $event){ } } OC_JSON::encodedPrint($return); -?>
\ No newline at end of file +?> |