From: Jan Gerber Date: Tue, 3 Apr 2012 18:26:21 +0000 (+0200) Subject: report real upload limit on Special:Upload X-Git-Tag: 1.31.0-rc.0~24055 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/bilan.php?a=commitdiff_plain;h=05c27c3af122b57f896927e5092bd25a9d8808d3;p=lhc%2Fweb%2Fwiklou.git report real upload limit on Special:Upload upload limit also depends on post_max_size check post_max_size and upload_max_filesize for reported upload limit. Change-Id: I587b67fb95f73d1b00ec1b407608934e8a1f1360 --- diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index fabe4c40c4..91631f8aed 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -830,7 +830,9 @@ class UploadForm extends HTMLForm { # that setting doesn't exist if ( !wfIsHipHop() ) { $this->mMaxUploadSize['file'] = min( $this->mMaxUploadSize['file'], - wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ) ); + wfShorthandToInteger( ini_get( 'upload_max_filesize' ) ), + wfShorthandToInteger( ini_get( 'post_max_size' ) ) + ); } $descriptor['UploadFile'] = array(