summaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-10-17 08:23:20 -0700
committerMorris Jobke <morris.jobke@gmail.com>2013-10-17 08:23:20 -0700
commitd8f22160a49fb6c0db21e83dae72b719a3bf4e88 (patch)
tree14e98477c68fad10ac4bbbe8e829094e02d0f4eb /apps/files_sharing
parent5633043ecfff81de109353638ee51b11876c358d (diff)
parentb4bffad99ab169b5a6bbb7ef0b2cfb7d60e37173 (diff)
downloadnextcloud-server-d8f22160a49fb6c0db21e83dae72b719a3bf4e88.tar.gz
nextcloud-server-d8f22160a49fb6c0db21e83dae72b719a3bf4e88.zip
Merge pull request #5393 from owncloud/files-downloadzipwhenzipsizeiszero
Fixed zip download button for unlimited filesize in public mode
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/public.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php
index 8bdbc8524e6..3d02227cb08 100644
--- a/apps/files_sharing/public.php
+++ b/apps/files_sharing/public.php
@@ -234,8 +234,9 @@ if (isset($path)) {
$folder->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true)));
$folder->assign('usedSpacePercent', 0);
$tmpl->assign('folder', $folder->fetchPage());
+ $maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
$allowZip = OCP\Config::getSystemValue('allowZipDownload', true)
- && $totalSize <= OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB'));
+ && ( $maxInputFileSize === 0 || $totalSize <= $maxInputFileSize);
$tmpl->assign('allowZipDownload', intval($allowZip));
$tmpl->assign('downloadURL',
OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath));