Merge pull request #10301 from owncloud/fix-internal-mail-share-links

Don't use /Shared as a base for links in share email
This commit is contained in:
Vincent Petry 2014-08-11 13:33:39 +02:00
commit 79fa2bc391
1 changed files with 10 additions and 5 deletions

View File

@ -99,15 +99,20 @@ class MailNotifications {
} }
} }
// Link to folder, or root folder if a file
if ($itemType === 'folder') { if ($itemType === 'folder') {
$foldername = "/Shared/" . $filename; $args = array(
'dir' => $filename,
);
} else { } else {
// if it is a file we can just link to the Shared folder, $args = array(
// that's the place where the user will find the file 'dir' => '/',
$foldername = "/Shared"; '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); list($htmlMail, $alttextMail) = $this->createMailBody($filename, $link, $expiration);