summaryrefslogtreecommitdiffstats
path: root/lib/private/share/mailnotifications.php
diff options
context:
space:
mode:
authorTom Needham <tom@owncloud.com>2014-08-09 00:21:29 +0100
committerTom Needham <tom@owncloud.com>2014-08-09 00:21:29 +0100
commitaeef10eb47a9b72ada5b8fde7d0667bff069de92 (patch)
tree7076316ab1761b80f523c3517f1e82bfd6b02fea /lib/private/share/mailnotifications.php
parent16dafa9cac162f3dcf00998f6e2ffb2b6ee70813 (diff)
downloadnextcloud-server-aeef10eb47a9b72ada5b8fde7d0667bff069de92.tar.gz
nextcloud-server-aeef10eb47a9b72ada5b8fde7d0667bff069de92.zip
Add scrollto to the url if sharing a file for long file lists
Diffstat (limited to 'lib/private/share/mailnotifications.php')
-rw-r--r--lib/private/share/mailnotifications.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php
index 62ab210b99e..1f4645eed9f 100644
--- a/lib/private/share/mailnotifications.php
+++ b/lib/private/share/mailnotifications.php
@@ -100,13 +100,19 @@ class MailNotifications {
}
// Link to folder, or root folder if a file
+
if ($itemType === 'folder') {
- $foldername = $filename;
+ $args = array(
+ 'dir' => $filename,
+ );
} else {
- $foldername = "/";
+ $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);