게시물의 썸네일 만들때 가로와 세로 크기가 다르면 썸네일 파일이름을 다르게 저장하고 겹치지 않도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2636 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-09-20 06:35:06 +00:00
parent 7b335eb9b1
commit c7c4b57470

View file

@ -275,7 +275,7 @@
return true;
}
function getThumbnail($width = 80, $height = 80) {
function getThumbnail($width = 80, $height = 0) {
if(!$height) $height = $width;
// 문서의 이미지 첨부파일 위치를 구함
@ -283,7 +283,8 @@
if(!is_dir($document_path)) FileHandler::makeDir($document_path);
// 썸네일 임시 파일명을 구함
$thumbnail_file = sprintf('%sthumbnail_%d.jpg', $document_path, $width);
if($width != $height) $thumbnail_file = sprintf('%sthumbnail_%dx%d.jpg', $document_path, $width, $height);
else $thumbnail_file = sprintf('%sthumbnail_%d.jpg', $document_path, $width);
// 썸네일이 있더라도 글의 수정시간과 비교해서 다르면 다시 생성함
if(file_exists($thumbnail_file)) {