summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-08-11 13:33:39 +0200
committerVincent Petry <pvince81@owncloud.com>2014-08-11 13:33:39 +0200
commit79fa2bc391e85657e62f5b23e4acfedd5153bbc2 (patch)
tree8fb554ccf16394df3e96b9df9f127336bb28d3f6
parentde9fe3a8d4491268e4c0eeeb4114d32549205079 (diff)
parentaeef10eb47a9b72ada5b8fde7d0667bff069de92 (diff)
downloadnextcloud-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.php15
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);