Remove unnecessary code from previous versions

This commit is contained in:
Kijin Sung 2020-07-04 23:54:46 +09:00
parent 22cb4c552a
commit 6ff3f34d3e

View file

@ -198,10 +198,8 @@ class editorModel extends editor
$file_config = $oFileModel->getUploadConfig();
$file_config->allowed_attach_size = $file_config->allowed_attach_size*1024*1024;
$file_config->allowed_filesize = $file_config->allowed_filesize*1024*1024;
if (PHP_INT_SIZE < 8)
{
$file_config->allowed_filesize = min($file_config->allowed_filesize, 2147483647);
}
// Calculate the appropriate chunk size.
$file_config->allowed_chunk_size = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')) * 0.95, 64 * 1024 * 1024);
if ($file_config->allowed_chunk_size > 4 * 1048576)
{
@ -219,13 +217,6 @@ class editorModel extends editor
$file_config->allowed_filesize = min($file_config->allowed_filesize, FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
$file_config->allowed_chunk_size = 0;
}
// Do not allow chunked uploads in XpressEditor.
if (starts_with($option->editor_skin, 'xpresseditor'))
{
$file_config->allowed_filesize = min($file_config->allowed_filesize, FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
$file_config->allowed_chunk_size = 0;
}
Context::set('file_config',$file_config);
// Configure upload status such as file size