mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
파일 크기 제한, 문서 첨부 제한 설정 오류 수정
upload_max_filesize가 MB단위로 되어있지 않은 경우(ex. 2G) 발생하던 오류를 수정했습니다.
This commit is contained in:
parent
b0dde0c044
commit
6438927f7e
1 changed files with 6 additions and 1 deletions
|
|
@ -175,7 +175,12 @@ class fileModel extends file
|
|||
if(!$config->allow_outlink) $config->allow_outlink = 'Y';
|
||||
if(!$config->download_grant) $config->download_grant = array();
|
||||
|
||||
$size = preg_replace('/[a-z]/is', '', ini_get('upload_max_filesize'));
|
||||
$size = ini_get('upload_max_filesize');
|
||||
$unit = strtolower($size[strlen($size) - 1]);
|
||||
$size = (float)$size;
|
||||
if($unit == 'g') $size *= 1024;
|
||||
if($unit == 'k') $size /= 1024;
|
||||
|
||||
if($config->allowed_filesize > $size)
|
||||
{
|
||||
$config->allowed_filesize = $size;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue