From 6de0eb0b741ff1cf0b735480a6c2d2fbcb1e70ca Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 15 Dec 2016 15:53:48 +0100 Subject: Remove leading slash from sharing activity Signed-off-by: Joas Schilling --- apps/files_sharing/lib/Activity/Providers/Downloads.php | 2 +- apps/files_sharing/lib/Activity/Providers/Groups.php | 2 +- apps/files_sharing/lib/Activity/Providers/PublicLinks.php | 2 +- apps/files_sharing/lib/Activity/Providers/Users.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/lib/Activity/Providers/Downloads.php b/apps/files_sharing/lib/Activity/Providers/Downloads.php index e1a25156441..01012e4785b 100644 --- a/apps/files_sharing/lib/Activity/Providers/Downloads.php +++ b/apps/files_sharing/lib/Activity/Providers/Downloads.php @@ -187,7 +187,7 @@ class Downloads implements IProvider { 'type' => 'file', 'id' => $id, 'name' => basename($path), - 'path' => $path, + 'path' => trim($path, '/'), 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), ]; } diff --git a/apps/files_sharing/lib/Activity/Providers/Groups.php b/apps/files_sharing/lib/Activity/Providers/Groups.php index 326ebba9ef7..6c25572d0d4 100644 --- a/apps/files_sharing/lib/Activity/Providers/Groups.php +++ b/apps/files_sharing/lib/Activity/Providers/Groups.php @@ -232,7 +232,7 @@ class Groups implements IProvider { 'type' => 'file', 'id' => $id, 'name' => basename($path), - 'path' => $path, + 'path' => trim($path, '/'), 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), ]; } diff --git a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php index ec8152c5a32..20070970bca 100644 --- a/apps/files_sharing/lib/Activity/Providers/PublicLinks.php +++ b/apps/files_sharing/lib/Activity/Providers/PublicLinks.php @@ -239,7 +239,7 @@ class PublicLinks implements IProvider { 'type' => 'file', 'id' => $id, 'name' => basename($path), - 'path' => $path, + 'path' => trim($path, '/'), 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), ]; } diff --git a/apps/files_sharing/lib/Activity/Providers/Users.php b/apps/files_sharing/lib/Activity/Providers/Users.php index d85eeadc315..4db72136a85 100644 --- a/apps/files_sharing/lib/Activity/Providers/Users.php +++ b/apps/files_sharing/lib/Activity/Providers/Users.php @@ -260,7 +260,7 @@ class Users implements IProvider { 'type' => 'file', 'id' => $id, 'name' => basename($path), - 'path' => $path, + 'path' => trim($path, '/'), 'link' => $this->url->linkToRouteAbsolute('files.viewcontroller.showFile', ['fileid' => $id]), ]; } -- cgit v1.2.3