Skip to content

Commit

Permalink
동일한 게시판으로 글 복사시 파일 복사 처리 수정 ( 제이프로 님 제안 )
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Sep 29, 2017
1 parent 38f1e83 commit 3beaf71
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bbs/move_update.php
Expand Up @@ -115,7 +115,9 @@
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);
}

Expand All @@ -124,7 +126,7 @@
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']}',
Expand Down

0 comments on commit 3beaf71

Please sign in to comment.