fix #758 프로필 이미지 변경 시 다른 확장자의 이미지가 남아 있어 변경이 반영되지 않을 수 있는 문제 고침

This commit is contained in:
bnu 2014-10-13 13:14:09 +09:00
parent 5276eda4c5
commit b1bc5f23db

View file

@ -721,6 +721,8 @@ class memberController extends member
elseif($type == 2) $ext = 'jpg';
else $ext = 'gif';
FileHandler::removeFilesInDir($target_path);
$target_filename = sprintf('%s%d.%s', $target_path, $member_srl, $ext);
// Convert if the image size is larger than a given size or if the format is not a gif
if($width > $max_width || $height > $max_height || $type!=1) FileHandler::createImageFile($target_file, $target_filename, $max_width, $max_height, $ext);