mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
Implement maximum image size constraint
This commit is contained in:
parent
280bdeb470
commit
c95f84adb8
6 changed files with 135 additions and 45 deletions
|
|
@ -62,11 +62,13 @@ class fileAdminController extends file
|
|||
function procFileAdminInsertUploadConfig()
|
||||
{
|
||||
// Update configuration
|
||||
$oFileModel = getModel('file');
|
||||
$config = $oFileModel->getFileConfig();
|
||||
$config = getModel('module')->getModuleConfig('file');
|
||||
$config->allowed_filesize = Context::get('allowed_filesize');
|
||||
$config->allowed_attach_size = Context::get('allowed_attach_size');
|
||||
$config->allowed_filetypes = str_replace(' ', '', Context::get('allowed_filetypes'));
|
||||
$config->max_image_width = intval(Context::get('max_image_width')) ?: '';
|
||||
$config->max_image_height = intval(Context::get('max_image_height')) ?: '';
|
||||
$config->max_image_size_action = Context::get('max_image_size_action') ?: '';
|
||||
|
||||
// Check maximum file size
|
||||
if (PHP_INT_SIZE < 8)
|
||||
|
|
@ -93,8 +95,7 @@ class fileAdminController extends file
|
|||
function procFileAdminInsertDownloadConfig()
|
||||
{
|
||||
// Update configuration
|
||||
$oFileModel = getModel('file');
|
||||
$config = $oFileModel->getFileConfig();
|
||||
$config = getModel('module')->getModuleConfig('file');
|
||||
$config->allow_outlink = Context::get('allow_outlink');
|
||||
$config->allow_outlink_format = Context::get('allow_outlink_format');
|
||||
$config->allow_outlink_site = Context::get('allow_outlink_site');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue