From 57ef089aac11f66f7cb29e9de1cb1e7d7bb46058 Mon Sep 17 00:00:00 2001 From: Morris Jobke Date: Mon, 2 Jun 2014 16:29:03 +0200 Subject: drop allowZIPdownload and maxZIPSize as options --- apps/files/admin.php | 12 ------------ apps/files/appinfo/update.php | 8 ++++++++ apps/files/index.php | 1 - apps/files/js/admin.js | 8 -------- apps/files/js/fileactions.js | 8 +------- apps/files/list.php | 1 - apps/files/templates/admin.php | 10 ---------- apps/files/templates/list.php | 13 +++++-------- 8 files changed, 14 insertions(+), 47 deletions(-) create mode 100644 apps/files/appinfo/update.php (limited to 'apps/files') diff --git a/apps/files/admin.php b/apps/files/admin.php index 02c3147dba5..bf12af74105 100644 --- a/apps/files/admin.php +++ b/apps/files/admin.php @@ -34,17 +34,7 @@ if($_POST && OC_Util::isCallRegistered()) { $maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize); } } - if(isset($_POST['maxZipInputSize'])) { - $maxZipInputSize=$_POST['maxZipInputSize']; - OCP\Config::setSystemValue('maxZipInputSize', OCP\Util::computerFileSize($maxZipInputSize)); - } - if(isset($_POST['submitFilesAdminSettings'])) { - OCP\Config::setSystemValue('allowZipDownload', isset($_POST['allowZipDownload'])); - } } -$maxZipInputSizeDefault = OCP\Util::computerFileSize('800 MB'); -$maxZipInputSize = OCP\Util::humanFileSize(OCP\Config::getSystemValue('maxZipInputSize', $maxZipInputSizeDefault)); -$allowZipDownload = intval(OCP\Config::getSystemValue('allowZipDownload', true)); OCP\App::setActiveNavigationEntry( "files_administration" ); @@ -56,6 +46,4 @@ $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); // max possible makes only sense on a 32 bit system $tmpl->assign( 'displayMaxPossibleUploadSize', PHP_INT_SIZE===4); $tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX)); -$tmpl->assign( 'allowZipDownload', $allowZipDownload); -$tmpl->assign( 'maxZipInputSize', $maxZipInputSize); return $tmpl->fetchPage(); diff --git a/apps/files/appinfo/update.php b/apps/files/appinfo/update.php new file mode 100644 index 00000000000..5f054f266bc --- /dev/null +++ b/apps/files/appinfo/update.php @@ -0,0 +1,8 @@ +assign("allowShareWithLink", $config->getAppValue('core', 'shareapi_allow $tmpl->assign("encryptionInitStatus", $encryptionInitStatus); $tmpl->assign('appNavigation', $nav); $tmpl->assign('appContents', $contentItems); -$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->printPage(); diff --git a/apps/files/js/admin.js b/apps/files/js/admin.js index 842b73c0cae..dcfec824cfe 100644 --- a/apps/files/js/admin.js +++ b/apps/files/js/admin.js @@ -25,12 +25,4 @@ $(document).ready(function() { // To get rid of onClick() switchPublicFolder(); }); - - $('#allowZipDownload').bind('change', function() { - if($('#allowZipDownload').attr('checked')) { - $('#maxZipInputSize').removeAttr('disabled'); - } else { - $('#maxZipInputSize').attr('disabled', 'disabled'); - } - }); }); diff --git a/apps/files/js/fileactions.js b/apps/files/js/fileactions.js index 3df62f37518..de02bf5e730 100644 --- a/apps/files/js/fileactions.js +++ b/apps/files/js/fileactions.js @@ -275,14 +275,8 @@ }); this.setDefault('dir', 'Open'); - var downloadScope; - if ($('#allowZipDownload').val() == 1) { - downloadScope = 'all'; - } else { - downloadScope = 'file'; - } - this.register(downloadScope, 'Download', OC.PERMISSION_READ, function () { + this.register('all', 'Download', OC.PERMISSION_READ, function () { return OC.imagePath('core', 'actions/download'); }, function (filename, context) { var dir = context.dir || context.fileList.getCurrentDirectory(); diff --git a/apps/files/list.php b/apps/files/list.php index e583839b251..5ecbd1c7fa0 100644 --- a/apps/files/list.php +++ b/apps/files/list.php @@ -33,6 +33,5 @@ $uploadLimit=OCP\Util::uploadLimit(); $tmpl = new OCP\Template('files', 'list', ''); $tmpl->assign('uploadLimit', $uploadLimit); // PHP upload limit $tmpl->assign('publicUploadEnabled', $publicUploadEnabled); -$tmpl->assign('allowZipDownload', intval(OCP\Config::getSystemValue('allowZipDownload', true))); $tmpl->printPage(); diff --git a/apps/files/templates/admin.php b/apps/files/templates/admin.php index 5f7d3261d6c..a75f0c94878 100644 --- a/apps/files/templates/admin.php +++ b/apps/files/templates/admin.php @@ -10,16 +10,6 @@
- checked="checked" /> -
- - ' - title="t( '0 is unlimited' )); ?>" - disabled="disabled" />
- t( 'Maximum input size for ZIP files' )); ?>
- diff --git a/apps/files/templates/list.php b/apps/files/templates/list.php index 17bf3b3de83..eddcd9f6236 100644 --- a/apps/files/templates/list.php +++ b/apps/files/templates/list.php @@ -61,13 +61,11 @@ t( 'Name' )); ?> - - - Download" /> - t('Download'))?> - - + + Download" /> + t('Download'))?> + @@ -89,7 +87,6 @@ -
-- cgit v1.2.3