aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/dav/lib/CalDAV/Activity/Provider/Event.php2
-rw-r--r--apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php2
2 files changed, 3 insertions, 1 deletions
diff --git a/apps/dav/lib/CalDAV/Activity/Provider/Event.php b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
index 9ae04aadbba..13f0036b0b0 100644
--- a/apps/dav/lib/CalDAV/Activity/Provider/Event.php
+++ b/apps/dav/lib/CalDAV/Activity/Provider/Event.php
@@ -97,7 +97,7 @@ class Event extends Base {
// The calendar app needs to be manually loaded for the routes to be loaded
OC_App::loadApp('calendar');
$linkData = $eventData['link'];
- $objectId = base64_encode('/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
+ $objectId = base64_encode($this->url->getWebroot() . '/remote.php/dav/calendars/' . $linkData['owner'] . '/' . $linkData['calendar_uri'] . '/' . $linkData['object_uri']);
$link = [
'view' => 'dayGridMonth',
'timeRange' => 'now',
diff --git a/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php b/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php
index 583ac6ca725..253e1628229 100644
--- a/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php
+++ b/apps/dav/tests/unit/CalDAV/Activity/Provider/EventTest.php
@@ -122,6 +122,8 @@ class EventTest extends TestCase {
->willReturn($calendarAppEnabled);
if ($calendarAppEnabled) {
$this->url->expects($this->once())
+ ->method('getWebroot');
+ $this->url->expects($this->once())
->method('linkToRouteAbsolute')
->with('calendar.view.indexview.timerange.edit', $generatedLink)
->willReturn('fullLink');