Merge pull request #7608 from owncloud/stable6-publicpagedownloadall

[stable6] Fixed "select all" + download on public page
This commit is contained in:
Morris Jobke 2014-03-11 10:29:08 +01:00
commit d290f44fc7

View file

@ -361,7 +361,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 });
}