diff --git a/files/admin.php b/files/admin.php
index b9c26c465f..1fe1ff55a4 100644
--- a/files/admin.php
+++ b/files/admin.php
@@ -35,16 +35,16 @@ if($_POST) {
}
if(isset($_POST['maxZipInputSize'])) {
$maxZipInputSize=$_POST['maxZipInputSize'];
- OC_Preferences::setValue('', 'files', 'maxZipInputSize', OC_Helper::computerFileSize($maxZipInputSize));
+ OC_Config::setValue('maxZipInputSize', OC_Helper::computerFileSize($maxZipInputSize));
}
- OC_Preferences::setValue('', 'files', 'allowZipDownload', isset($_POST['allowZipDownload']));
+ OC_Config::setValue('allowZipDownload', isset($_POST['allowZipDownload']));
}else{
$upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
- $allowZipDownload = intval(OC_Preferences::getValue('', 'files', 'allowZipDownload', 1));
- $maxZipInputSize = OC_Helper::humanfilesize(OC_Preferences::getValue('', 'files', 'maxZipInputSize', OC_Helper::computerFileSize('800 MB')));
+ $maxZipInputSize = OC_Helper::humanfilesize(OC_Config::getValue('maxZipInputSize', OC_Helper::computerFileSize('800 MB')));
}
+$allowZipDownload = intval(OC_Config::getValue('allowZipDownload', true));
OC_App::setActiveNavigationEntry( "files_administration" );
diff --git a/files/templates/index.php b/files/templates/index.php
index 497a0f36c0..3302cfa929 100644
--- a/files/templates/index.php
+++ b/files/templates/index.php
@@ -40,7 +40,7 @@
t( 'Name' ); ?>
-
+
" />
" />
@@ -70,4 +70,4 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/lib/files.php b/lib/files.php
index 662f0b5972..57ebb9005a 100644
--- a/lib/files.php
+++ b/lib/files.php
@@ -224,7 +224,7 @@ class OC_Files {
* @param files $files
*/
static function validateZipDownload($dir, $files) {
- if(!OC_Preferences::getValue('', 'files', 'allowZipDownload', 1)) {
+ if(!OC_Config::getValue('allowZipDownload', true)) {
$l = new OC_L10N('files');
header("HTTP/1.0 409 Conflict");
$tmpl = new OC_Template( '', 'error', 'user' );
@@ -239,7 +239,7 @@ class OC_Files {
exit;
}
- $zipLimit = OC_Preferences::getValue('', 'files', 'maxZipInputSize', OC_Helper::computerFileSize('800 MB'));
+ $zipLimit = OC_Config::getValue('maxZipInputSize', OC_Helper::computerFileSize('800 MB'));
if($zipLimit > 0) {
$totalsize = 0;
if(is_array($files)){