php.ini의 파일 업로드 용량을 잘못 불러오는 문제 수정

파일 업로드 용량 체크시 관리자일 경우 ini에서 직접 불러와서 처리하는데 이때 단위 처리가 빠져있어 무조건 MB 단위로 처리되는
버그 수정
스킨과의 호환성을 위해 1048576으로 나눠서 MB 단위로 처리되게 수정하였습니다.
This commit is contained in:
YJSoft 2015-01-12 16:22:46 +09:00
parent d0b64fde1e
commit 7de923f9a3
5 changed files with 27 additions and 19 deletions

View file

@ -150,6 +150,25 @@ class file extends ModuleObject
function recompileCache()
{
}
/**
* Change value from human readable to byte unit
*
* @param string $size_str Size string
* @return int The byte value for input
*/
function _changeBytes($size_str)
{
$unit = strtoupper(substr($size_str, -1));
$size_str = (int)$size_str;
switch ($unit)
{
case 'G': $size_str *= 1024;
case 'M': $size_str *= 1024;
case 'K': $size_str *= 1024;
}
return $size_str;
}
}
/* End of file file.class.php */
/* Location: ./modules/file/file.class.php */