mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
if file delete, update file count in document table
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12610 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d6ae208275
commit
62fec548c6
2 changed files with 34 additions and 0 deletions
|
|
@ -735,6 +735,8 @@ class fileController extends file
|
|||
$srls = explode(',',$file_srl);
|
||||
if(!count($srls)) return;
|
||||
|
||||
$oDocumentController = &getController('document');
|
||||
$documentSrlList = array();
|
||||
for($i=0;$i<count($srls);$i++)
|
||||
{
|
||||
$srl = (int)$srls[$i];
|
||||
|
|
@ -743,11 +745,17 @@ class fileController extends file
|
|||
$args = null;
|
||||
$args->file_srl = $srl;
|
||||
$output = executeQuery('file.getFile', $args);
|
||||
|
||||
if(!$output->toBool()) continue;
|
||||
|
||||
$file_info = $output->data;
|
||||
if(!$file_info) continue;
|
||||
|
||||
if($file_info->upload_target_srl)
|
||||
{
|
||||
array_push($documentSrlList, $file_info->upload_target_srl);
|
||||
}
|
||||
|
||||
$source_filename = $output->data->source_filename;
|
||||
$uploaded_filename = $output->data->uploaded_filename;
|
||||
// Call a trigger (before)
|
||||
|
|
@ -764,6 +772,8 @@ class fileController extends file
|
|||
FileHandler::removeFile($uploaded_filename);
|
||||
}
|
||||
|
||||
$oDocumentController->updateUploaedCount($documentSrlList);
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue