From 6e75b37d04b5daf00f85eed925fd5b0203d09cb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 2 May 2014 15:51:41 +0200 Subject: disable download button if zip download is disabled --- apps/files_sharing/public.php | 3 ++- apps/files_sharing/templates/public.php | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'apps/files_sharing') diff --git a/apps/files_sharing/public.php b/apps/files_sharing/public.php index 3abcbf291ff..e17ffc48036 100644 --- a/apps/files_sharing/public.php +++ b/apps/files_sharing/public.php @@ -165,12 +165,13 @@ if (isset($path)) { $folder->assign('disableSharing', true); $folder->assign('trash', false); $tmpl->assign('folder', $folder->fetchPage()); - $maxInputFileSize = OCP\Config::getSystemValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB')); $allowZip = OCP\Config::getSystemValue('allowZipDownload', true); $tmpl->assign('allowZipDownload', intval($allowZip)); + $tmpl->assign('showDownloadButton', intval($allowZip)); $tmpl->assign('downloadURL', OCP\Util::linkToPublic('files') . $urlLinkIdentifiers . '&download&path=' . urlencode($getPath)); } else { + $tmpl->assign('showDownloadButton', true); $tmpl->assign('dir', $dir); // Show file preview if viewer is available diff --git a/apps/files_sharing/templates/public.php b/apps/files_sharing/templates/public.php index 12d72ca6d77..f3c75134a5f 100644 --- a/apps/files_sharing/templates/public.php +++ b/apps/files_sharing/templates/public.php @@ -15,10 +15,12 @@ src="" alt="getName()); ?>" />
+ "/> t('Download'))?> +
-- cgit v1.2.3