aboutsummaryrefslogtreecommitdiffstats
path: root/apps/calendar/ajax
diff options
context:
space:
mode:
authorBart Visscher <bartv@thisnet.nl>2012-06-21 23:20:09 +0200
committerBart Visscher <bartv@thisnet.nl>2012-06-21 23:30:04 +0200
commitc047fdafdb64503ef10db2ac1cc2d1d9120a1244 (patch)
tree8f8686166e1ecad79d237f15d7f3baf4e0a11bd5 /apps/calendar/ajax
parentf46623da6cff1019ccce2adc61ea293e49a6fb34 (diff)
downloadnextcloud-server-c047fdafdb64503ef10db2ac1cc2d1d9120a1244.tar.gz
nextcloud-server-c047fdafdb64503ef10db2ac1cc2d1d9120a1244.zip
Calendar: Fix missing template parameter 'shared' for new and update calendar
Diffstat (limited to 'apps/calendar/ajax')
-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
+));