diff options
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Activity/FavoriteProvider.php | 5 | ||||
-rw-r--r-- | apps/files/lib/Activity/Provider.php | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/apps/files/lib/Activity/FavoriteProvider.php b/apps/files/lib/Activity/FavoriteProvider.php index 8047eb1319e..ed00d50f221 100644 --- a/apps/files/lib/Activity/FavoriteProvider.php +++ b/apps/files/lib/Activity/FavoriteProvider.php @@ -142,10 +142,11 @@ class FavoriteProvider implements IProvider { 'type' => 'file', 'id' => $event->getObjectId(), 'name' => basename($event->getObjectName()), - 'path' => $event->getObjectName(), + 'path' => trim($event->getObjectName(), '/'), + 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $event->getObjectId()]), ]; - $event->setParsedSubject(str_replace('{file}', trim($parameter['path'], '/'), $subject)) + $event->setParsedSubject(str_replace('{file}', $parameter['path'], $subject)) ->setRichSubject($subject, ['file' => $parameter]); } } diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php index 92686ec0c36..ae303034610 100644 --- a/apps/files/lib/Activity/Provider.php +++ b/apps/files/lib/Activity/Provider.php @@ -201,7 +201,7 @@ class Provider implements IProvider { foreach ($parameters as $placeholder => $parameter) { $placeholders[] = '{' . $placeholder . '}'; if ($parameter['type'] === 'file') { - $replacements[] = trim($parameter['path'], '/'); + $replacements[] = $parameter['path']; } else { $replacements[] = $parameter['name']; } @@ -253,7 +253,8 @@ class Provider implements IProvider { 'type' => 'file', 'id' => $id, 'name' => basename($path), - 'path' => $path, + 'path' => trim($path, '/'), + 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), ]; } |