mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Enforce allowed filesize and type in extra var upload form
This commit is contained in:
parent
7fe2203cbd
commit
3ffeb63afb
3 changed files with 23 additions and 2 deletions
|
|
@ -472,9 +472,12 @@ class FileModel extends File
|
|||
*
|
||||
* @return object Returns a file configuration of current module. If user is admin, returns PHP's max file size and allow all file types.
|
||||
*/
|
||||
public static function getUploadConfig()
|
||||
public static function getUploadConfig($module_srl = 0)
|
||||
{
|
||||
$module_srl = Context::get('module_srl') ?: (Context::get('current_module_info')->module_srl ?? 0);
|
||||
if (!$module_srl)
|
||||
{
|
||||
$module_srl = Context::get('module_srl') ?: (Context::get('current_module_info')->module_srl ?? 0);
|
||||
}
|
||||
$config = self::getFileConfig($module_srl);
|
||||
if (Rhymix\Framework\Session::isAdmin())
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue