aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/calendar/ajax/calendar/new.php8
-rw-r--r--apps/calendar/ajax/calendar/update.php8
2 files changed, 14 insertions, 2 deletions
diff --git a/apps/calendar/ajax/calendar/new.php b/apps/calendar/ajax/calendar/new.php
index 278c8e5520b..e77d4ebff03 100644
--- a/apps/calendar/ajax/calendar/new.php
+++ b/apps/calendar/ajax/calendar/new.php
@@ -31,7 +31,13 @@ OC_Calendar_Calendar::setCalendarActive($calendarid, 1);
$calendar = OC_Calendar_Calendar::find($calendarid);
$tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $calendar);
+if(OC_Calendar_Share::allUsersSharedwith($calendarid, OC_Calendar_Share::CALENDAR) == array()){
+ $shared = false;
+}else{
+ $shared = true;
+}
+$tmpl->assign('shared', $shared);
OCP\JSON::success(array(
'page' => $tmpl->fetchPage(),
'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
-)); \ No newline at end of file
+));
diff --git a/apps/calendar/ajax/calendar/update.php b/apps/calendar/ajax/calendar/update.php
index 5cf63d396f7..a2c898c8075 100644
--- a/apps/calendar/ajax/calendar/update.php
+++ b/apps/calendar/ajax/calendar/update.php
@@ -36,7 +36,13 @@ OC_Calendar_Calendar::setCalendarActive($calendarid, $_POST['active']);
$calendar = OC_Calendar_App::getCalendar($calendarid);
$tmpl = new OCP\Template('calendar', 'part.choosecalendar.rowfields');
$tmpl->assign('calendar', $calendar);
+if(OC_Calendar_Share::allUsersSharedwith($calendarid, OC_Calendar_Share::CALENDAR) == array()){
+ $shared = false;
+}else{
+ $shared = true;
+}
+$tmpl->assign('shared', $shared);
OCP\JSON::success(array(
'page' => $tmpl->fetchPage(),
'eventSource' => OC_Calendar_Calendar::getEventSourceInfo($calendar),
-)); \ No newline at end of file
+));