From 14daec98be5220a2371e7eeca9a31c3d3115f64c Mon Sep 17 00:00:00 2001 From: Thomas Müller Date: Mon, 22 Jul 2013 13:08:59 +0200 Subject: Squashed commit of the following: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit commit 7e875ff47ae1a3e546c74fb12895b2bfbeedabdf Author: Thomas Müller Date: Sun Jul 14 21:58:08 2013 +0200 No admin option to enable public upload in case encryption is enabled No upload on pubic page if public upload is disabled commit 4939d9a668c13cdd74e8bb8e305bdd7a59661c4d Author: Thomas Mueller Date: Fri Jul 12 21:34:38 2013 +0200 change anonymous to public commit c3bda8654d911383ae0acf9e41adda7117cb79f8 Author: Thomas Müller Date: Fri Jul 12 17:51:01 2013 +0200 fixing Undefined index: publicUploadEnabled commit 98861afde443c12a2ef5290c83c63fd12b7b196d Author: Thomas Müller Date: Fri Jul 12 17:05:58 2013 +0200 in case the encryption app is enabled we cannot yet allow anonymous upload commit 974f09629d0e8bf5d90cf8546fa4a82738ebdebe Author: Thomas Müller Date: Fri Jul 12 17:03:51 2013 +0200 new admin setting added which allows to turn off anonymous uploads --- apps/files/index.php | 5 +++++ apps/files/templates/index.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'apps/files') diff --git a/apps/files/index.php b/apps/files/index.php index 2338cf439e4..2f005391509 100644 --- a/apps/files/index.php +++ b/apps/files/index.php @@ -121,6 +121,10 @@ if ($needUpgrade) { // information about storage capacities $storageInfo=OC_Helper::getStorageInfo(); $maxUploadFilesize=OCP\Util::maxUploadFilesize($dir); + $publicUploadEnabled = \OC_Appconfig::getValue('core', 'shareapi_allow_public_upload', 'yes'); + if (OC_App::isEnabled('files_encryption')) { + $publicUploadEnabled = 'no'; + } OCP\Util::addscript('files', 'fileactions'); OCP\Util::addscript('files', 'files'); @@ -138,5 +142,6 @@ if ($needUpgrade) { $tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->assign('usedSpacePercent', (int)$storageInfo['relative']); $tmpl->assign('isPublic', false); + $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); $tmpl->printPage(); } diff --git a/apps/files/templates/index.php b/apps/files/templates/index.php index b9a420887ed..e3d4115413d 100644 --- a/apps/files/templates/index.php +++ b/apps/files/templates/index.php @@ -59,7 +59,7 @@
t('Nothing in here. Upload something!'))?>
- +
-- cgit v1.2.3