한 글에 같은 제목의 이미지 파일도 등록할 수 있게 수정(이전에는 같은 이름으로 다른 파일은 등록이 되어도 실질적으로 등록이 안되었음)

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6436 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
misol 2009-05-28 16:13:53 +00:00
parent a0a0bad46d
commit 4ba43cc5d0

View file

@ -60,9 +60,9 @@
$file_info = Context::get('Filedata');
// 정상적으로 업로드된 파일이 아니면 오류 출력
if(is_uploaded_file($file_info['tmp_name'])){
$output = $this->insertFile($file_info, $module_srl, $upload_target_srl);
Context::set('uploaded_fileinfo',$output);
}
$output = $this->insertFile($file_info, $module_srl, $upload_target_srl);
Context::set('uploaded_fileinfo',$output);
}
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('iframe');
@ -350,7 +350,7 @@
// direct 파일에 해킹을 의심할 수 있는 확장자가 포함되어 있으면 바로 삭제함
$file_info['name'] = preg_replace('/\.(php|phtm|htm|cgi|pl|exe|jsp|asp|inc)/i', '$0-x',$file_info['name']);
$path = sprintf("./files/attach/images/%s/%s", $module_srl,getNumberingPath($upload_target_srl,3));
$path = sprintf("./files/attach/images/%s/%s%s/", $module_srl,getNumberingPath($upload_target_srl,3),md5(crypt(rand(1000000,900000), rand(0,100))));
$filename = $path.$file_info['name'];
$direct_download = 'Y';
} else {