mirror of
https://github.com/nextcloud/server.git
synced 2024-09-10 05:47:02 +02:00
Fixed zip download button for unlimited filesize in public mode
Added missing condition to check whenever allowed zip size is unlimited. Fixes #3717
This commit is contained in:
parent
9c8d1190c0
commit
b4bffad99a
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user