Hello,
the current implementation of files/admin.php doesn't work with another
activated admin form, because the current code set's some variables in case
of POST only if the files/admin form has been executed ...
I have activated admin_export and when exporting the variables from the
admin/files form are not set and and errors occurs.
A fix is in the attached patch.
But there are more problems in this source:
* the current code set's the default in the form from the defaults and
not from the configured values
* the value for 'maxUploadSize' will be set directly in the .htaccess
file from the function OC_Files::setUploadLimit(), but this function has
the content of .htaccess hardcoded
it is different from the current one -- but what's worse: different from
a file the user changed
I hope you know what to do with this further errors.
Yours
Uwe Koloska
diff --git a/files/admin.php b/files/admin.php
index 1fe1ff5..0fb330f 100644
--- a/files/admin.php
+++ b/files/admin.php
@@ -28,6 +28,11 @@ require_once('../lib/base.php');
OC_Util::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
+
+$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($_POST) {
if(isset($_POST['maxUploadSize'])){
$maxUploadFilesize=$_POST['maxUploadSize'];
@@ -38,11 +43,6 @@ if($_POST) {
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')));
}
$allowZipDownload = intval(OC_Config::getValue('allowZipDownload', true));
_______________________________________________
Owncloud mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/owncloud