HOR-917 El tamaño máximo permitido para subir un file en el endpoint light/config sin Auth no es el correcto

This commit is contained in:
Ronald Q
2016-05-04 10:30:40 -04:00
parent 8e20cfb4c9
commit 0204a4f0f2

View File

@@ -1308,7 +1308,12 @@ class Light
}
$response['listLanguage'] = $languagesList;
if (isset($params['fileLimit']) && $params['fileLimit']) {
$response['fileLimit'] = $this->return_bytes(ini_get('post_max_size'));
$postMaxSize = $this->return_bytes(ini_get('post_max_size'));
$uploadMaxFileSize = $this->return_bytes(ini_get('upload_max_filesize'));
if ($postMaxSize < $uploadMaxFileSize){
$uploadMaxFileSize = $postMaxSize;
}
$response['fileLimit'] = $uploadMaxFileSize;
}
if (isset($params['tz']) && $params['tz']) {
$response['tz'] = isset($_SESSION['USR_TIME_ZONE'])?$_SESSION['USR_TIME_ZONE']:$sysConf['time_zone'];