Read the upload limit from a DB prop

This commit is contained in:
Daniel Berteaud 2013-11-19 15:55:17 +01:00
parent d44e8002f3
commit 297080320c
1 changed files with 6 additions and 2 deletions

View File

@ -4,6 +4,10 @@ my $allow = ($access eq 'public')?'all':"$localAccess $externalSSLAccess";
my $authtype = $dl{'Authentication'} || 'http';
my $alias = (($dl{'AliasOnPrimary'} || 'enabled') eq 'enabled') ?
'Alias /dl /usr/share/dl' : '';
my $maxupload = $dl{'MaxUploadSize'} || '1024';
my $maxpost = $maxupload+1;
$maxupload .= 'M';
$maxpost .= 'M';
my $auth = '';
if ($authtype eq 'http'){
$auth =<<'EOF';
@ -30,8 +34,8 @@ $alias
php_admin_flag file_uploads On
php_admin_flag magic_quotes Off
php_admin_flag magic_quotes_gpc Off
php_admin_value upload_max_filesize 1024M
php_admin_value post_max_size 1025M
php_admin_value upload_max_filesize $maxupload
php_admin_value post_max_size $maxpost
php_admin_value memory_limit 100M
php_admin_flag output_buffering Off
php_admin_value max_execution_time 0