mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(caldav): add webroot to objectid for activities
A calendar uri includes the webroot: example.com/cloud/remote.php/dav/calendars/alice/personal/ The calendar app uses base64(calendar uri) as identifier for calendar objects. Without this patch the links from activity app to calendar app don't work for installations in a subdirectory. Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
1137b7abf1
commit
457f4a530e
2 changed files with 3 additions and 1 deletions
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -121,6 +121,8 @@ class EventTest extends TestCase {
|
|||
->with('calendar')
|
||||
->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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue