diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-03-22 20:40:04 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-03-22 20:40:04 +0100 |
commit | 8e8c4a8edc630ff833361c067da5e0d30e94c6d1 (patch) | |
tree | 295e854c72f90874149f578f8f55112383338bf5 /files | |
parent | 8f8d486f35c8f1d290e3db2ba7ae42dcb380d1dd (diff) | |
parent | 82b54938e32a980d3d268a63fdf56598f12e2ff4 (diff) | |
download | nextcloud-server-8e8c4a8edc630ff833361c067da5e0d30e94c6d1.tar.gz nextcloud-server-8e8c4a8edc630ff833361c067da5e0d30e94c6d1.zip |
Merge branch 'master' into sabredav_1.6
Diffstat (limited to 'files')
-rw-r--r-- | files/admin.php | 8 | ||||
-rw-r--r-- | files/index.php | 1 | ||||
-rw-r--r-- | files/templates/index.php | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/files/admin.php b/files/admin.php index b9c26c465f3..1fe1ff55a4c 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/index.php b/files/index.php index 79261e495be..82d09608924 100644 --- a/files/index.php +++ b/files/index.php @@ -98,6 +98,7 @@ $tmpl->assign( 'readonly', !OC_Filesystem::is_writable($dir)); $tmpl->assign( "files", $files ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize)); +$tmpl->assign( 'allowZipDownload', intval(OC_Config::getValue('allowZipDownload', true))); $tmpl->printPage(); ?> diff --git a/files/templates/index.php b/files/templates/index.php index 497a0f36c0d..da1e58ce137 100644 --- a/files/templates/index.php +++ b/files/templates/index.php @@ -40,7 +40,7 @@ <?php if(!isset($_['readonly']) || !$_['readonly']) { ?><input type="checkbox" id="select_all" /><?php } ?> <span class='name'><?php echo $l->t( 'Name' ); ?></span> <span class='selectedActions'> - <?php if(OC_Preferences::getValue('', 'files', 'allowZipDownload', 1)) : ?> + <?php if($_['allowZipDownload']) : ?> <a href="" title="<?php echo $l->t('Download')?>" class="download"><img class='svg' alt="Download" src="<?php echo image_path("core", "actions/download.svg"); ?>" /></a> <?php endif; ?> <a href="" title="Share" class="share"><img class='svg' alt="Share" src="<?php echo image_path("core", "actions/share.svg"); ?>" /></a> @@ -70,4 +70,4 @@ </div> <!-- config hints for javascript --> -<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo OC_Preferences::getValue('', 'files', 'allowZipDownload', 1); ?>" />
\ No newline at end of file +<input type="hidden" name="allowZipDownload" id="allowZipDownload" value="<?php echo $_['allowZipDownload']; ?>" />
\ No newline at end of file |