mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-09 12:02:24 +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
|
// Success returned if no attachement exists
|
||||||
if(!is_array($file_list)||!count($file_list)) return new Object();
|
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
|
// Delete the file
|
||||||
$path = array();
|
$path = array();
|
||||||
$file_count = count($file_list);
|
$file_count = count($file_list);
|
||||||
|
|
@ -864,6 +858,13 @@ class fileController extends file
|
||||||
$path_info = pathinfo($uploaded_filename);
|
$path_info = pathinfo($uploaded_filename);
|
||||||
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
|
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
|
// Remove a file directory of the document
|
||||||
for($i=0, $c=count($path); $i<$c; $i++)
|
for($i=0, $c=count($path); $i<$c; $i++)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue