summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorg Ehrke <dev@georgswebsite.de>2012-04-13 17:36:47 -0400
committerGeorg Ehrke <dev@georgswebsite.de>2012-04-13 17:36:47 -0400
commit5d4c546693e2572d8bbf331fdcd0e9dce3bfba0d (patch)
tree020cfb903cb3281613933169c9cb68a7b3d69fbd
parentea3499a712d87281bd749ed5c384430401f80f22 (diff)
downloadnextcloud-server-5d4c546693e2572d8bbf331fdcd0e9dce3bfba0d.tar.gz
nextcloud-server-5d4c546693e2572d8bbf331fdcd0e9dce3bfba0d.zip
fix public sharing of calendars
-rw-r--r--apps/calendar/share.php4
-rw-r--r--apps/calendar/templates/share.dropdown.php2
2 files changed, 3 insertions, 3 deletions
diff --git a/apps/calendar/share.php b/apps/calendar/share.php
index 2ba50d9cf21..1cc8a2ef15e 100644
--- a/apps/calendar/share.php
+++ b/apps/calendar/share.php
@@ -4,8 +4,8 @@ $token = strip_tags($_GET['t']);
$shared = OC_Calendar_Share::getElementByToken($token);
$nl = "\n\r";
if($shared['type'] == OC_Calendar_Share::CALENDAR){
- $calendar = OC_Calendar_App::getCalendar($cal, false);
- $calobjects = OC_Calendar_Object::all($cal);
+ $calendar = OC_Calendar_App::getCalendar($shared['id'], false);
+ $calobjects = OC_Calendar_Object::all($shared['id']);
header('Content-Type: text/Calendar');
header('Content-Disposition: inline; filename=' . $calendar['displayname'] . '.ics');
foreach($calobjects as $calobject){
diff --git a/apps/calendar/templates/share.dropdown.php b/apps/calendar/templates/share.dropdown.php
index 8e3baa77248..3ed75be6363 100644
--- a/apps/calendar/templates/share.dropdown.php
+++ b/apps/calendar/templates/share.dropdown.php
@@ -73,5 +73,5 @@ echo html_select_options($allgroups, array());
</ul>
<div id="public">
<input type="checkbox" id="publish" <?php echo ($public['share'])?'checked="checked"':'' ?>><label for="publish"><?php echo $l->t('make public'); ?></label><br>
- <input type="text" id="public_token" value="<?php echo OC_Helper::linkToAbsolute('calendar', 'share.php?t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
+ <input type="text" id="public_token" value="<?php echo OC_Helper::linkToAbsolute('apps/calendar', 'share.php?t=' . $public['share'], null, true) ; ?>" onmouseover="$('#public_token').select();" style="<?php echo (!$public['share'])?'display:none':'' ?>">
</div> \ No newline at end of file