diff options
author | Tom Needham <tom@owncloud.com> | 2014-08-09 00:21:29 +0100 |
---|---|---|
committer | Tom Needham <tom@owncloud.com> | 2014-08-09 00:21:29 +0100 |
commit | aeef10eb47a9b72ada5b8fde7d0667bff069de92 (patch) | |
tree | 7076316ab1761b80f523c3517f1e82bfd6b02fea /lib/private/share/mailnotifications.php | |
parent | 16dafa9cac162f3dcf00998f6e2ffb2b6ee70813 (diff) | |
download | nextcloud-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.php | 12 |
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); |