Merge "Fix mime detection of easily-confused-with text/plain formats"
[lhc/web/wiklou.git] / includes / upload / UploadBase.php
index ac894ae..5defd45 100644 (file)
@@ -118,7 +118,7 @@ abstract class UploadBase {
         * Can be overridden by subclasses.
         *
         * @param User $user
-        * @return bool
+        * @return bool|string
         */
        public static function isAllowed( $user ) {
                foreach ( array( 'upload', 'edit' ) as $permission ) {
@@ -435,7 +435,7 @@ abstract class UploadBase {
                }
 
                $this->mFileProps = FSFile::getPropsFromPath( $this->mTempPath, $this->mFinalExtension );
-               $mime = $this->mFileProps['file-mime'];
+               $mime = $this->mFileProps['mime'];
 
                if ( $wgVerifyMimeType ) {
                        # XXX: Missing extension will be caught by validateName() via getTitle()