diff options
author | Vincent Petry <pvince81@owncloud.com> | 2014-08-11 13:33:39 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2014-08-11 13:33:39 +0200 |
commit | 79fa2bc391e85657e62f5b23e4acfedd5153bbc2 (patch) | |
tree | 8fb554ccf16394df3e96b9df9f127336bb28d3f6 | |
parent | de9fe3a8d4491268e4c0eeeb4114d32549205079 (diff) | |
parent | aeef10eb47a9b72ada5b8fde7d0667bff069de92 (diff) | |
download | nextcloud-server-79fa2bc391e85657e62f5b23e4acfedd5153bbc2.tar.gz nextcloud-server-79fa2bc391e85657e62f5b23e4acfedd5153bbc2.zip |
Merge pull request #10301 from owncloud/fix-internal-mail-share-links
Don't use /Shared as a base for links in share email
-rw-r--r-- | lib/private/share/mailnotifications.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php index cb74dcf8b90..1f4645eed9f 100644 --- a/lib/private/share/mailnotifications.php +++ b/lib/private/share/mailnotifications.php @@ -99,15 +99,20 @@ class MailNotifications { } } + // Link to folder, or root folder if a file + if ($itemType === 'folder') { - $foldername = "/Shared/" . $filename; + $args = array( + 'dir' => $filename, + ); } else { - // if it is a file we can just link to the Shared folder, - // that's the place where the user will find the file - $foldername = "/Shared"; + $args = array( + 'dir' => '/', + 'scrollto' => $filename, + ); } - $link = \OCP\Util::linkToAbsolute('files', 'index.php', array("dir" => $foldername)); + $link = \OCP\Util::linkToAbsolute('files', 'index.php', $args); list($htmlMail, $alttextMail) = $this->createMailBody($filename, $link, $expiration); |