merge sandbox to trunk for 1.4.4.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@7944 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2010-11-30 07:01:36 +00:00
parent 9139515e57
commit f59deeb270
131 changed files with 11605 additions and 4218 deletions

View file

@ -21,6 +21,11 @@
* sync이상없도록
**/
function procFileUpload() {
$file_info = Context::get('Filedata');
// 정상적으로 업로드된 파일이 아니면 오류 출력
if(!is_uploaded_file($file_info['tmp_name'])) exit();
// 기본적으로 필요한 변수 설정
$oFileModel = &getModel('file');
$editor_sequence = Context::get('editor_sequence');
@ -36,10 +41,6 @@
// 세션정보에도 정의되지 않았다면 새로 생성
if(!$upload_target_srl) $_SESSION['upload_info'][$editor_sequence]->upload_target_srl = $upload_target_srl = getNextSequence();
$file_info = Context::get('Filedata');
// 정상적으로 업로드된 파일이 아니면 오류 출력
if(!is_uploaded_file($file_info['tmp_name'])) exit();
return $this->insertFile($file_info, $module_srl, $upload_target_srl);
}
@ -403,10 +404,13 @@
$file_info['name'] = str_replace(array('<','>'),array('%3C','%3E'),$file_info['name']);
$path = sprintf("./files/attach/images/%s/%s", $module_srl,getNumberingPath($upload_target_srl,3));
$filename = $path.$file_info['name'];
// 파일 이름에서 특수문자를 _로 변환
$_filename = preg_replace('/[#$&*?+%"\']/', '_', $file_info['name']);
$filename = $path.$_filename;
$idx = 1;
while(file_exists($filename)) {
$filename = $path.preg_replace('/\.([a-z0-9]+)$/i','_'.$idx.'.$1',$file_info['name']);
$filename = $path.preg_replace('/\.([a-z0-9]+)$/i','_'.$idx.'.$1',$_filename);
$idx++;
}
$direct_download = 'Y';

View file

@ -51,8 +51,8 @@
'regdate' => '登録日',
'ipaddress' => 'IPアドレス',
);
$lang->msg_not_allowed_outlink = 'It is not allowed to download files not from this site.';
$lang->msg_not_permitted_create = '파일 또는 디렉토리를 생성할 수 없습니다.';
$lang->msg_file_upload_error = '파일 업로드 중 에러가 발생하였습니다.';
$lang->msg_not_allowed_outlink = '外部リンクからのダウンロードは許可されていません。';
$lang->msg_not_permitted_create = 'ファイルまたはディレクトリを生成できません。';
$lang->msg_file_upload_error = 'ファイルアップロードに失敗しました。';
?>