report real upload limit on Special:Upload
authorJan Gerber <j@thing.net>
Tue, 3 Apr 2012 18:26:21 +0000 (20:26 +0200)
committerJan Gerber <j@thing.net>
Tue, 3 Apr 2012 18:32:33 +0000 (20:32 +0200)
upload limit also depends on post_max_size
check post_max_size and upload_max_filesize
for reported upload limit.

Change-Id: I587b67fb95f73d1b00ec1b407608934e8a1f1360

includes/specials/SpecialUpload.php

index fabe4c4..91631f8 100644 (file)
@@ -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(