#1055 게시물 이동 시 첨부파일의 수를 갱신하는 동작을 간소화 하도록 개선

This commit is contained in:
bnu 2014-12-29 17:15:30 +09:00
parent 228f4aa9bc
commit 21961fb3e9
4 changed files with 32 additions and 19 deletions

View file

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