]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix public sharing of calendars
authorGeorg Ehrke <dev@georgswebsite.de>
Fri, 13 Apr 2012 21:36:47 +0000 (17:36 -0400)
committerGeorg Ehrke <dev@georgswebsite.de>
Fri, 13 Apr 2012 21:36:47 +0000 (17:36 -0400)
apps/calendar/share.php
apps/calendar/templates/share.dropdown.php

index 2ba50d9cf2105ec28a5aaf455e8b59839932293e..1cc8a2ef15edd9708cc73f9ba3edc5fff45e3dd8 100644 (file)
@@ -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){
index 8e3baa77248c047c001b4530d50fce7d682bb5fe..3ed75be636347476477da43a62c037b0ccb812c4 100644 (file)
@@ -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