diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-12 19:43:43 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2012-04-12 20:17:52 +0200 |
commit | 1ade37305f9398be7d32c7bb2a3a609814f4ede1 (patch) | |
tree | f570edd4d58c318ad6a3a463bbc1952d6447d512 /files | |
parent | b86f2069ff1f434373c0babe0c28db5ee431498e (diff) | |
download | nextcloud-server-1ade37305f9398be7d32c7bb2a3a609814f4ede1.tar.gz nextcloud-server-1ade37305f9398be7d32c7bb2a3a609814f4ede1.zip |
always display config values
don't change values unintentionally
Diffstat (limited to 'files')
-rw-r--r-- | files/admin.php | 14 | ||||
-rw-r--r-- | files/templates/admin.php | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/files/admin.php b/files/admin.php index 1fe1ff55a4c..289d95cb912 100644 --- a/files/admin.php +++ b/files/admin.php @@ -28,6 +28,7 @@ require_once('../lib/base.php'); OC_Util::checkAdminUser(); $htaccessWorking=(getenv('htaccessWorking')=='true'); + if($_POST) { if(isset($_POST['maxUploadSize'])){ $maxUploadFilesize=$_POST['maxUploadSize']; @@ -37,13 +38,14 @@ if($_POST) { $maxZipInputSize=$_POST['maxZipInputSize']; OC_Config::setValue('maxZipInputSize', OC_Helper::computerFileSize($maxZipInputSize)); } - 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); - $maxZipInputSize = OC_Helper::humanfilesize(OC_Config::getValue('maxZipInputSize', OC_Helper::computerFileSize('800 MB'))); + if(isset($_POST['submitFilesAdminSettings'])) { + OC_Config::setValue('allowZipDownload', isset($_POST['allowZipDownload'])); + } } +$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); +$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/admin.php b/files/templates/admin.php index fd86d02e1ed..730f55f2768 100644 --- a/files/templates/admin.php +++ b/files/templates/admin.php @@ -10,6 +10,6 @@ <fieldset class="personalblock"> <label for="maxZipInputSize"><?php echo $l->t( 'Maximum input size for ZIP files:' ); ?> </label><input name="maxZipInputSize" id="maxZipInputSize" value='<?php echo $_['maxZipInputSize'] ?>' title="<?php echo $l->t( '0 is unlimited' ); ?>"<?php if (!$_['allowZipDownload']) echo ' disabled="disabled"'; ?> /><br/> </fieldset> - <input type="submit" value="Save"/> + <input type="submit" name="submitFilesAdminSettings" id="submitFilesAdminSettings" value="Save"/> </fieldset> </form> |