동일한 게시판으로 글 복사시 파일 복사 처리 수정 ( 제이프로 님 제안 )
This commit is contained in:
@ -115,7 +115,9 @@ while ($row = sql_fetch_array($result))
|
||||
if ($row3['bf_file'])
|
||||
{
|
||||
// 원본파일을 복사하고 퍼미션을 변경
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$row3['bf_file']);
|
||||
// 제이프로님 코드제안 적용
|
||||
$copy_file_name = ($bo_table !== $move_bo_table) ? $row3['bf_file'] : $row2['wr_id'].'_copy_'.$insert_id.'_'.$row3['bf_file'];
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$copy_file_name);
|
||||
@chmod($dst_dir/$row3['bf_file'], G5_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
@ -124,7 +126,7 @@ while ($row = sql_fetch_array($result))
|
||||
wr_id = '$insert_id',
|
||||
bf_no = '{$row3['bf_no']}',
|
||||
bf_source = '".addslashes($row3['bf_source'])."',
|
||||
bf_file = '{$row3['bf_file']}',
|
||||
bf_file = '$copy_file_name',
|
||||
bf_download = '{$row3['bf_download']}',
|
||||
bf_content = '".addslashes($row3['bf_content'])."',
|
||||
bf_filesize = '{$row3['bf_filesize']}',
|
||||
|
||||
Reference in New Issue
Block a user