mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 11:11:39 +09:00
#1055 게시물 이동 시 첨부파일의 수를 갱신하는 동작을 간소화 하도록 개선
This commit is contained in:
parent
228f4aa9bc
commit
21961fb3e9
4 changed files with 32 additions and 19 deletions
|
|
@ -2482,18 +2482,13 @@ class documentController extends document
|
|||
if(is_array($documentSrlList))
|
||||
{
|
||||
$documentSrlList = array_unique($documentSrlList);
|
||||
foreach($documentSrlList AS $key=>$documentSrl)
|
||||
foreach($documentSrlList AS $key => $documentSrl)
|
||||
{
|
||||
$oldDocument = $oDocumentModel->getDocument($documentSrl);
|
||||
$fileCount = $oFileModel->getFilesCount($documentSrl);
|
||||
|
||||
if($oldDocument != null)
|
||||
{
|
||||
$newDocumentArray = $oldDocument->variables;
|
||||
$newDocumentArray['uploaded_count'] = $fileCount;
|
||||
$newDocumentObject = (object) $newDocumentArray;
|
||||
$this->updateDocument($oldDocument, $newDocumentObject);
|
||||
}
|
||||
$args = new stdClass();
|
||||
$args->document_srl = $documentSrl;
|
||||
$args->uploaded_count = $fileCount;
|
||||
executeQuery('document.updateUploadedCount', $args);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue