Use existing CSS classes for label and input elements in table for proper aligning
[lhc/web/wiklou.git] / includes / SpecialUpload.php
index 3c6d2f6..a8aa91e 100644 (file)
@@ -280,7 +280,7 @@ class UploadForm {
                $details = null;
                $value = null;
                $value = $this->internalProcessUpload( $details );
-               
+
                switch($value) {
                        case self::SUCCESS:
                                $wgOut->redirect( $this->mLocalFile->getTitle()->getFullURL() );
@@ -376,11 +376,6 @@ class UploadForm {
                        return self::BEFORE_PROCESSING;
                }
 
-               /* Check for curl error */
-               if( $this->mCurlError ) {
-                       return self::BEFORE_PROCESSING;
-               }
-
                /**
                 * If there was no filename or a zero size given, give up quick.
                 */
@@ -388,6 +383,11 @@ class UploadForm {
                        return self::EMPTY_FILE;
                }
 
+               /* Check for curl error */
+               if( $this->mCurlError ) {
+                       return self::BEFORE_PROCESSING;
+               }
+
                # Chop off any directories in the given filename
                if( $this->mDesiredDestName ) {
                        $basename = $this->mDesiredDestName;
@@ -981,9 +981,9 @@ wgUploadAutoFill = {$autofill};
                }
 
                # Get the maximum file size from php.ini as $wgMaxUploadSize works for uploads from URL via CURL only
-               # See http://de.php.net/manual/en/ini.core.php#ini.upload-max-filesize for possible values of upload_max_filesize
+               # See http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize for possible values of upload_max_filesize
                $val = trim( ini_get( 'upload_max_filesize' ) );
-               $last = ( substr( $val, -1 ) );
+               $last = strtoupper( ( substr( $val, -1 ) ) );
                switch( $last ) {
                        case 'G':
                                $val2 = substr( $val, 0, -1 ) * 1024 * 1024 * 1024;
@@ -998,7 +998,7 @@ wgUploadAutoFill = {$autofill};
                                $val2 = $val;
                }
                $val2 = $wgAllowCopyUploads ? min( $wgMaxUploadSize, $val2 ) : $val2;
-               $maxUploadSize = wfMsgExt( 'upload-maxfilesize', 'parseinline', $wgLang->formatSize( $val2 ) );
+               $maxUploadSize = wfMsgExt( 'upload-maxfilesize', array( 'parseinline', 'escapenoentities' ), $wgLang->formatSize( $val2 ) );
 
                $sourcefilename = wfMsgExt( 'sourcefilename', 'escapenoentities' );
                $destfilename = wfMsgExt( 'destfilename', 'escapenoentities' );