[Pkg-owncloud-commits] [owncloud] 52/121: Add scrollto to the url if sharing a file for long file lists

David Prévot taffit at moszumanska.debian.org
Thu Aug 21 16:44:31 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository owncloud.

commit 3bcca4f344834bd6dffe5dfcc96551ff9c65c168
Author: Tom Needham <tom at owncloud.com>
Date:   Sat Aug 9 00:21:29 2014 +0100

    Add scrollto to the url if sharing a file for long file lists
---
 lib/private/share/mailnotifications.php | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/private/share/mailnotifications.php b/lib/private/share/mailnotifications.php
index 62ab210..1f4645e 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);
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list