[Pkg-owncloud-commits] [owncloud] 28/134: Fixed "select all" + download on public page

David Prévot taffit at moszumanska.debian.org
Fri Apr 18 21:43:57 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 b4c10eea607c97d805bb658438df8f82487986b4
Author: Vincent Petry <pvince81 at owncloud.com>
Date:   Thu Mar 6 20:32:27 2014 +0100

    Fixed "select all" + download on public page
    
    When a user has lots of files, selecting all and downloading would send
    the whole list of files to the server.
    
    This fix makes it use the simpler default download URL in such cases
    (the one that was used by the "Download" button that is now removed on
    the public page)
---
 apps/files/js/files.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/apps/files/js/files.js b/apps/files/js/files.js
index b5633ae..f39d9aa 100644
--- a/apps/files/js/files.js
+++ b/apps/files/js/files.js
@@ -350,7 +350,12 @@ $(document).ready(function() {
 		// use special download URL if provided, e.g. for public shared files
 		var downloadURL = document.getElementById("downloadURL");
 		if ( downloadURL ) {
-			window.location = downloadURL.value+"&download&files=" + encodeURIComponent(fileslist);
+			// downloading all in root of public share ? (replacement for old "Download" button)
+			if ($('#isPublic').val() && dir === '/' && $('#select_all').is(':checked')) {
+				window.location = downloadURL.value;
+			} else {
+				window.location = downloadURL.value+"&download&files=" + encodeURIComponent(fileslist);
+			}
 		} else {
 			window.location = OC.filePath('files', 'ajax', 'download.php') + '?'+ $.param({ dir: dir, files: fileslist });
 		}

-- 
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