From d98c8242af50f91a265ff19463b4abaad8bc7260 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 27 Oct 2014 10:08:00 +0900 Subject: [PATCH] =?UTF-8?q?1:1=EB=AC=B8=EC=9D=98=20=EA=B8=80=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bbs/qadelete.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bbs/qadelete.php b/bbs/qadelete.php index efa1b050e..07373f40d 100644 --- a/bbs/qadelete.php +++ b/bbs/qadelete.php @@ -17,7 +17,7 @@ if(!$count) for($i=0; $i<$count; $i++) { $qa_id = $tmp_array[$i]; - $sql = " select qa_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2 + $sql = " select qa_id, mb_id, qa_type, qa_status, qa_parent, qa_content, qa_file1, qa_file2 from {$g5['qa_content_table']} where qa_id = '$qa_id' "; $row = sql_fetch($sql); @@ -25,6 +25,10 @@ for($i=0; $i<$count; $i++) { if(!$row['qa_id']) continue; + // 자신의 글이 아니면 건너뜀 + if($is_admin != 'super' && $row['mb_id'] != $member['mb_id']) + continue; + // 첨부파일 삭제 for($k=1; $k<=2; $k++) { @unlink(G5_DATA_PATH.'/qa/'.$row['qa_file'.$k]);