mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Set proper module_srl and mid when uploading in member and communication modules
This commit is contained in:
parent
f6a02fd006
commit
e1cfb09652
5 changed files with 82 additions and 3 deletions
|
|
@ -251,13 +251,25 @@ class EditorModel extends Editor
|
|||
}
|
||||
|
||||
Context::set('file_config',$file_config);
|
||||
|
||||
// Configure upload status such as file size
|
||||
$upload_status = FileModel::getUploadStatus();
|
||||
Context::set('upload_status', $upload_status);
|
||||
|
||||
// Upload enabled (internally caching)
|
||||
FileController::setUploadInfo($option->editor_sequence, $upload_target_srl, $option->module_srl ?? 0);
|
||||
|
||||
// Set editor mid
|
||||
if (!empty($option->mid))
|
||||
{
|
||||
Context::addHtmlFooter('<script> var editor_mid = ' . json_encode($option->mid) . '; </script>');
|
||||
}
|
||||
|
||||
// Check if the file already exists
|
||||
if($upload_target_srl) $files_count = FileModel::getFilesCount($upload_target_srl);
|
||||
if ($upload_target_srl)
|
||||
{
|
||||
$files_count = FileModel::getFilesCount($upload_target_srl);
|
||||
}
|
||||
}
|
||||
Context::set('files_count', (int)$files_count);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue