aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2014-06-02 16:29:03 +0200
committerMorris Jobke <morris.jobke@gmail.com>2014-06-02 16:29:03 +0200
commit57ef089aac11f66f7cb29e9de1cb1e7d7bb46058 (patch)
treed68c62c5ee4c29cedc14756168e627356d9e914b /apps/files
parent6f4bdbdb9495227c1ad1bf170ad9caeddea127c7 (diff)
downloadnextcloud-server-57ef089aac11f66f7cb29e9de1cb1e7d7bb46058.tar.gz
nextcloud-server-57ef089aac11f66f7cb29e9de1cb1e7d7bb46058.zip
drop allowZIPdownload and maxZIPSize as options
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/admin.php12
-rw-r--r--apps/files/appinfo/update.php8
-rw-r--r--apps/files/index.php1
-rw-r--r--apps/files/js/admin.js8
-rw-r--r--apps/files/js/fileactions.js8
-rw-r--r--apps/files/list.php1
-rw-r--r--apps/files/templates/admin.php10
-rw-r--r--apps/files/templates/list.php13
8 files changed, 14 insertions, 47 deletions
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 @@
+<?php
+
+// this drops the keys below, because they aren't needed anymore
+// core related
+if (version_compare(\OC_Config::getValue('version', '0.0.0'), '7.0.0', '<')) {
+ \OC_Config::deleteKey('allowZipDownload');
+ \OC_Config::deleteKey('maxZipInputSize');
+}
diff --git a/apps/files/index.php b/apps/files/index.php
index 95ae7977ecc..ba46866ab19 100644
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -123,6 +123,5 @@ $tmpl->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 @@
<?php endif;?>
<br/>
<?php endif;?>
- <input type="checkbox" name="allowZipDownload" id="allowZipDownload" value="1"
- title="<?php p($l->t( 'Needed for multi-file and folder downloads.' )); ?>"
- <?php if ($_['allowZipDownload']): ?> checked="checked"<?php endif; ?> />
- <label for="allowZipDownload"><?php p($l->t( 'Enable ZIP-download' )); ?></label><br/>
-
- <input type="text" name="maxZipInputSize" id="maxZipInputSize" style="width:180px;" value='<?php p($_['maxZipInputSize']) ?>'
- title="<?php p($l->t( '0 is unlimited' )); ?>"
- <?php if (!$_['allowZipDownload']): ?> disabled="disabled"<?php endif; ?> /><br />
- <em><?php p($l->t( 'Maximum input size for ZIP files' )); ?> </em><br />
-
<input type="hidden" value="<?php p($_['requesttoken']); ?>" name="requesttoken" />
<input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings"
value="<?php p($l->t( 'Save' )); ?>"/>
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 @@
<label for="select_all_files"></label>
<a class="name sort columntitle" data-sort="name"><span><?php p($l->t( 'Name' )); ?></span><span class="sort-indicator"></span></a>
<span id="selectedActionsList" class="selectedActions">
- <?php if($_['allowZipDownload']) : ?>
- <a href="" class="download">
- <img class="svg" alt="Download"
- src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>" />
- <?php p($l->t('Download'))?>
- </a>
- <?php endif; ?>
+ <a href="" class="download">
+ <img class="svg" alt="Download"
+ src="<?php print_unescaped(OCP\image_path("core", "actions/download.svg")); ?>" />
+ <?php p($l->t('Download'))?>
+ </a>
</span>
</div>
</th>
@@ -89,7 +87,6 @@
<tfoot>
</tfoot>
</table>
-<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php p($_['allowZipDownload']); ?>" />
<input type="hidden" name="dir" id="dir" value="" />
<div id="editor"></div><!-- FIXME Do not use this div in your app! It is deprecated and will be removed in the future! -->
<div id="uploadsize-message" title="<?php p($l->t('Upload too large'))?>">