Merge pull request #5393 from owncloud/files-downloadzipwhenzipsizeiszero

Fixed zip download button for unlimited filesize in public mode
remotes/origin/stable6
Morris Jobke 2013-10-17 08:23:20 +07:00
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));