Skip to content

Commit

Permalink
글 복사 이동시 첨부파일 권한 변경 코드 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
thisgun committed Jun 18, 2019
1 parent 1723880 commit 86fb983
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bbs/move_update.php
Expand Up @@ -127,7 +127,7 @@
// 제이프로님 코드제안 적용
$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);
@chmod($dst_dir.'/'.$copy_file_name, G5_FILE_PERMISSION);
}

$sql = " insert into {$g5['board_file_table']}
Expand Down Expand Up @@ -199,8 +199,12 @@
for ($i=0; $i<count($save); $i++)
{
if( isset($save[$i]['bf_file']) && $save[$i]['bf_file'] ){
for ($k=0; $k<count($save[$i]['bf_file']); $k++)
for ($k=0; $k<count($save[$i]['bf_file']); $k++) {
@unlink($save[$i]['bf_file'][$k]);

// 썸네일 파일 삭제, 먼지손 님 코드 제안
delete_board_thumbnail($bo_table, basename($save[$i]['bf_file'][$k]));
}
}

sql_query(" delete from $write_table where wr_parent = '{$save[$i]['wr_id']}' ");
Expand Down

0 comments on commit 86fb983

Please sign in to comment.