mirror of
https://github.com/nextcloud/server.git
synced 2026-04-21 22:27:31 -04:00
Merge pull request #5393 from owncloud/files-downloadzipwhenzipsizeiszero
Fixed zip download button for unlimited filesize in public mode
This commit is contained in:
commit
d8f22160a4
1 changed files with 2 additions and 1 deletions
|
|
@ -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 a new issue