1:1문의 글삭제 오류 수정

This commit is contained in:
chicpro
2014-10-27 10:08:00 +09:00
parent 4ae4cc2169
commit d98c8242af

View File

@ -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]);