Add scrollto to the url if sharing a file for long file lists

This commit is contained in:
Tom Needham 2014-08-09 00:21:29 +01:00
parent 16dafa9cac
commit aeef10eb47
1 changed files with 9 additions and 3 deletions

View File

@ -100,13 +100,19 @@ class MailNotifications {
} }
// Link to folder, or root folder if a file // Link to folder, or root folder if a file
if ($itemType === 'folder') { if ($itemType === 'folder') {
$foldername = $filename; $args = array(
'dir' => $filename,
);
} else { } 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); list($htmlMail, $alttextMail) = $this->createMailBody($filename, $link, $expiration);