mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:05:23 +02:00
[ticket/16141] plupload chunk_size when 'unlimited' is involved.
Change get_chunk_size() calculation to correctly calculate limits without letting a zero "unlimited" value always win. Also ensure get_chunk_size() can only return zero if all of the limits were in fact set to unlimited. PHPBB3-16141
This commit is contained in:
@ -305,14 +305,14 @@ class plupload
|
|||||||
|
|
||||||
if ($limit_upload > 0)
|
if ($limit_upload > 0)
|
||||||
{
|
{
|
||||||
$max = min($limit_upload, $max ? $max : $limit_upload);
|
$max = min($limit_upload, ($max ? $max : $limit_upload));
|
||||||
}
|
}
|
||||||
|
|
||||||
$limit_post = $this->php_ini->getBytes('post_max_size');
|
$limit_post = $this->php_ini->getBytes('post_max_size');
|
||||||
|
|
||||||
if ($limit_post > 0)
|
if ($limit_post > 0)
|
||||||
{
|
{
|
||||||
$max = min($limit_post, $max ? $max : $limit_post);
|
$max = min($limit_post, ($max ? $max : $limit_post));
|
||||||
}
|
}
|
||||||
|
|
||||||
// $config['max_filesize'] is not a limiter to chunk size.
|
// $config['max_filesize'] is not a limiter to chunk size.
|
||||||
|
Reference in New Issue
Block a user