불필요한 경로 체크 코드 삭제

This commit is contained in:
chicpro
2014-02-28 09:41:20 +09:00
parent 07176252c8
commit df9a0086d5

View File

@ -29,14 +29,11 @@ function get_list_thumbnail($bo_table, $wr_id, $thumb_width, $thumb_height, $is_
{
// 이미지 path 구함
$p = parse_url($matches[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
if(strpos($p['path'], '/'.G5_DATA_DIR.'/') != 0)
$data_path = preg_replace('/^\/.*\/'.G5_DATA_DIR.'/', '/'.G5_DATA_DIR, $p['path']);
else
$data_path = $p['path'];
if(!preg_match('/^\/'.G5_DATA_DIR.'/', $data_path))
continue;
$srcfile = G5_PATH.$data_path;
if(preg_match("/\.({$config['cf_image_extension']})$/i", $srcfile) && is_file($srcfile)) {
@ -105,14 +102,11 @@ function get_view_thumbnail($contents, $thumb_width=0)
// 이미지 path 구함
$p = parse_url($src);
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
if(strpos($p['path'], '/'.G5_DATA_DIR.'/') != 0)
$data_path = preg_replace('/^\/.*\/'.G5_DATA_DIR.'/', '/'.G5_DATA_DIR, $p['path']);
else
$data_path = $p['path'];
if(!preg_match('/^\/'.G5_DATA_DIR.'/', $data_path))
continue;
$srcfile = G5_PATH.$data_path;
if(is_file($srcfile)) {