. * */ // Init owncloud require_once('../lib/base.php'); OC_Util::checkAdminUser(); $htaccessWorking=(getenv('htaccessWorking')=='true'); if($_POST) { if(isset($_POST['maxUploadSize'])){ $maxUploadFilesize=$_POST['maxUploadSize']; OC_Files::setUploadLimit(OC_Helper::computerFileSize($maxUploadFilesize)); } if(isset($_POST['maxZipInputSize'])) { $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'))); } $allowZipDownload = intval(OC_Config::getValue('allowZipDownload', true)); OC_App::setActiveNavigationEntry( "files_administration" ); $tmpl = new OC_Template( 'files', 'admin' ); $tmpl->assign( 'htaccessWorking', $htaccessWorking ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'allowZipDownload', $allowZipDownload); $tmpl->assign( 'maxZipInputSize', $maxZipInputSize); return $tmpl->fetchPage();