경로가 잘못 반환되어 thumb-이미지 파일이 삭제되지 않던 오류 수정

This commit is contained in:
kagla
2021-09-16 04:55:11 +00:00
parent 63217a6a67
commit 50612db75a

View File

@ -2346,7 +2346,8 @@ function delete_editor_thumbnail($contents)
for($i=0; $i<count($matchs[1]); $i++) {
// 이미지 path 구함
$imgurl = @parse_url($matchs[1][$i]);
$srcfile = dirname(G5_PATH).$imgurl['path'];
// $srcfile = dirname(G5_PATH).$imgurl['path'];
$srcfile = (G5_PATH).$imgurl['path'];
if(! preg_match('/(\.jpe?g|\.gif|\.png)$/i', $srcfile)) continue;
$filename = preg_replace("/\.[^\.]+$/i", "", basename($srcfile));
$filepath = dirname($srcfile);