X-Git-Url: https://git.cyclocoop.org/%242?a=blobdiff_plain;f=includes%2FSetup.php;h=fbfef1fb90ff9a3149239415b07f970b58bc8830;hb=59b627b0b7ad87317601f676a1ebd2441f63f59d;hp=67c99c9d244f073192203306b446864205346d79;hpb=3442989e7fea4e32056bfc58294117f06cb631ae;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Setup.php b/includes/Setup.php index 67c99c9d24..fbfef1fb90 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -373,6 +373,15 @@ if ( $wgResourceLoaderMaxQueryLength === false ) { unset( $suhosinMaxValueLength ); } +// Ensure the minimum chunk size is less than PHP upload limits or the maximum +// upload size. +$wgMinUploadChunkSize = min( + $wgMinUploadChunkSize, + $wgMaxUploadSize, + wfShorthandToInteger( ini_get( 'upload_max_filesize' ), 1e100 ), + wfShorthandToInteger( ini_get( 'post_max_size' ), 1e100 ) - 1024 # Leave room for other parameters +); + /** * Definitions of the NS_ constants are in Defines.php * @private