mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-17 17:32:15 +09:00
#1055 게시물 이동 시 첨부파일의 수를 갱신하는 동작을 간소화 하도록 개선
This commit is contained in:
parent
228f4aa9bc
commit
21961fb3e9
4 changed files with 32 additions and 19 deletions
|
|
@ -95,6 +95,7 @@ class documentAdminController extends document
|
|||
$oFileController = getController('file');
|
||||
|
||||
$files = $oDocument->getUploadedFiles();
|
||||
$delete_file_srls = array();
|
||||
if(is_array($files))
|
||||
{
|
||||
foreach($files as $val)
|
||||
|
|
@ -119,9 +120,10 @@ class documentAdminController extends document
|
|||
$obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
|
||||
}
|
||||
}
|
||||
// Delete an existing file
|
||||
$oFileController->deleteFile($val->file_srl);
|
||||
$delete_file_srls[] = $val->file_srl;
|
||||
}
|
||||
// Delete an existing file
|
||||
$oFileController->deleteFile($delete_file_srls);
|
||||
}
|
||||
// Set the all files to be valid
|
||||
$oFileController->setFilesValid($obj->document_srl);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue