mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-30 00:29:58 +09:00
썸네일 찾는 루틴 수정
git-svn-id: http://xe-core.googlecode.com/svn/trunk@2163 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
30fe66741a
commit
2e240f810e
1 changed files with 6 additions and 1 deletions
|
|
@ -251,6 +251,8 @@
|
||||||
if($modified_time > $file_created_time) unlink($thumbnail_file);
|
if($modified_time > $file_created_time) unlink($thumbnail_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(file_exists($thumbnail_file)&&filesize($thumbnail_file)<1) return;
|
||||||
|
|
||||||
// 썸네일 파일이 있으면 url return
|
// 썸네일 파일이 있으면 url return
|
||||||
if(file_exists($thumbnail_file)) return Context::getRequestUri().$thumbnail_file;
|
if(file_exists($thumbnail_file)) return Context::getRequestUri().$thumbnail_file;
|
||||||
|
|
||||||
|
|
@ -284,7 +286,10 @@
|
||||||
$tmp_file = sprintf('%sthumbnail_%d.tmp.gif', $document_path, $width);
|
$tmp_file = sprintf('%sthumbnail_%d.tmp.gif', $document_path, $width);
|
||||||
|
|
||||||
if($src) FileHandler::getRemoteFile($src, $tmp_file);
|
if($src) FileHandler::getRemoteFile($src, $tmp_file);
|
||||||
else return;
|
else {
|
||||||
|
FileHandler::writeFile($thumbnail_file,'');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
FileHandler::createImageFile($tmp_file, $thumbnail_file, $width, $width, 'gif');
|
FileHandler::createImageFile($tmp_file, $thumbnail_file, $width, $width, 'gif');
|
||||||
unlink($tmp_file);
|
unlink($tmp_file);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue