Changeset 2965

Show
Ignore:
Timestamp:
07/05/2008 10:42:47 AM (5 months ago)
Author:
Shadowhand
Message:

Fixing #673, thanks Stalwart.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/modules/forge/libraries/Form_Upload.php

    r2415 r2965  
    130130                        return; 
    131131 
    132                 if (defined('FILEINFO_MIME')) 
    133                 { 
    134                         $info = new finfo(FILEINFO_MIME); 
    135  
    136                         // Get the mime type using Fileinfo 
    137                         $mime = $info->file($this->upload['tmp_name']); 
    138  
    139                         $info->close(); 
    140                 } 
    141                 elseif (ini_get('magic.mime') AND function_exists('mime_content_type')) 
    142                 { 
    143                         // Get the mime type using magic.mime 
    144                         $mime = mime_content_type($this->upload['tmp_name']); 
    145                 } 
    146                 else 
     132                if (($mime = file::mime($this->upload['tmp_name'])) === FALSE) 
    147133                { 
    148134                        // Trust the browser