diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-10-17 15:29:22 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-10-17 15:30:08 +0200 |
commit | b4bffad99ab169b5a6bbb7ef0b2cfb7d60e37173 (patch) | |
tree | 473d9c21428177b128d9517940df47f82f9cff2b /apps/files_sharing/public.php | |
parent | 9c8d1190c0295e4ded8e9812d842af5c65679926 (diff) | |
download | nextcloud-server-b4bffad99ab169b5a6bbb7ef0b2cfb7d60e37173.tar.gz nextcloud-server-b4bffad99ab169b5a6bbb7ef0b2cfb7d60e37173.zip |
Fixed zip download button for unlimited filesize in public mode
Added missing condition to check whenever allowed zip size is unlimited.
Fixes #3717
Diffstat (limited to 'apps/files_sharing/public.php')
-rw-r--r-- | apps/files_sharing/public.php | 3 |
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)); |