mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 02:31:40 +09:00
Merge pull request #1132 from sejin7940/document_delete
게시글을 삭제 시 해당 글에 첨부된 첨부파일이 삭제되지 않는 문제 고침
This commit is contained in:
commit
182572ce49
1 changed files with 7 additions and 6 deletions
|
|
@ -847,12 +847,6 @@ class fileController extends file
|
|||
// Success returned if no attachement exists
|
||||
if(!is_array($file_list)||!count($file_list)) return new Object();
|
||||
|
||||
// Remove from the DB
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.deleteFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Delete the file
|
||||
$path = array();
|
||||
$file_count = count($file_list);
|
||||
|
|
@ -864,6 +858,13 @@ class fileController extends file
|
|||
$path_info = pathinfo($uploaded_filename);
|
||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
||||
}
|
||||
|
||||
// Remove from the DB
|
||||
$args = new stdClass();
|
||||
$args->upload_target_srl = $upload_target_srl;
|
||||
$output = executeQuery('file.deleteFiles', $args);
|
||||
if(!$output->toBool()) return $output;
|
||||
|
||||
// Remove a file directory of the document
|
||||
for($i=0, $c=count($path); $i<$c; $i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue