diff options
Diffstat (limited to 'includes/Setup.php')
-rw-r--r-- | includes/Setup.php | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/includes/Setup.php b/includes/Setup.php index b3bf0fca..1b6d66c0 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -368,6 +368,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 @@ -502,11 +511,11 @@ unset( $serverParts ); // Set defaults for configuration variables // that are derived from the server name by default -if ( $wgEmergencyContact === false ) { +// Note: $wgEmergencyContact and $wgPasswordSender may be false or empty string (T104142) +if ( !$wgEmergencyContact ) { $wgEmergencyContact = 'wikiadmin@' . $wgServerName; } - -if ( $wgPasswordSender === false ) { +if ( !$wgPasswordSender ) { $wgPasswordSender = 'apache@' . $wgServerName; } |