summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-03-07 11:37:49 +0100
committerVincent Petry <pvince81@owncloud.com>2016-03-07 11:37:49 +0100
commitd8e592d6701abfd4ce956a835a82015df6e06a48 (patch)
treeb88270691cf81e8da6c7e219d98770b7fbb2b2b8
parentc07b731689de6fe754e108688ccf71342aad95ef (diff)
downloadnextcloud-server-d8e592d6701abfd4ce956a835a82015df6e06a48.tar.gz
nextcloud-server-d8e592d6701abfd4ce956a835a82015df6e06a48.zip
Fix archive file name when downloading public share
When download a public link share folder using the button on the top right, it doesn't provide a list of files. This fix makes sure to trigger the correct logic when no file list was given.
-rw-r--r--apps/files_sharing/lib/controllers/sharecontroller.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/files_sharing/lib/controllers/sharecontroller.php b/apps/files_sharing/lib/controllers/sharecontroller.php
index 84143d85e47..ea024b6016a 100644
--- a/apps/files_sharing/lib/controllers/sharecontroller.php
+++ b/apps/files_sharing/lib/controllers/sharecontroller.php
@@ -479,7 +479,7 @@ class ShareController extends Controller {
$this->emitAccessShareHook($share);
// download selected files
- if (!is_null($files)) {
+ if (!is_null($files) && $files !== '') {
// FIXME: The exit is required here because otherwise the AppFramework is trying to add headers as well
// after dispatching the request which results in a "Cannot modify header information" notice.
OC_Files::get($originalSharePath, $files_list, $_SERVER['REQUEST_METHOD'] == 'HEAD');