mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Enforce php.ini limits when not using CKEditor + jQuery File Upload
This commit is contained in:
parent
73d4ea842f
commit
d981b649c1
3 changed files with 18 additions and 1 deletions
|
|
@ -309,6 +309,15 @@ class fileModel extends file
|
|||
function getUploadStatus($attached_size = 0)
|
||||
{
|
||||
$file_config = $this->getUploadConfig();
|
||||
if (Context::get('allow_chunks') === 'Y')
|
||||
{
|
||||
$allowed_filesize = $file_config->allowed_filesize * 1024 * 1024;
|
||||
}
|
||||
else
|
||||
{
|
||||
$allowed_filesize = min(FileHandler::returnBytes(ini_get('upload_max_filesize')), FileHandler::returnBytes(ini_get('post_max_size')));
|
||||
}
|
||||
|
||||
// Display upload status
|
||||
$upload_status = sprintf(
|
||||
'%s : %s/ %s<br /> %s : %s (%s : %s)',
|
||||
|
|
@ -316,7 +325,7 @@ class fileModel extends file
|
|||
FileHandler::filesize($attached_size),
|
||||
FileHandler::filesize($file_config->allowed_attach_size*1024*1024),
|
||||
lang('allowed_filesize'),
|
||||
FileHandler::filesize($file_config->allowed_filesize*1024*1024),
|
||||
FileHandler::filesize($allowed_filesize),
|
||||
lang('allowed_filetypes'),
|
||||
$file_config->allowed_filetypes
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue