DataObjects/Images.php
authoredward <edward@roojs.com>
Thu, 21 Jan 2016 06:43:59 +0000 (14:43 +0800)
committeredward <edward@roojs.com>
Thu, 21 Jan 2016 06:43:59 +0000 (14:43 +0800)
DataObjects/Images.php

index b52bfbb..154067b 100644 (file)
@@ -658,27 +658,6 @@ class Pman_Core_DataObjects_Images extends DB_DataObject
             return false;
         }
         
-        require_once 'File/MimeType.php';
-        $y = new File_MimeType();
-        
-        if (in_array($this->mimetype, array(
-                        'text/application',
-                        'application/octet-stream',
-                        'image/x-png',  // WTF does this?
-                        'image/pjpeg',  // WTF does this?
-                        'application/x-apple-msg-attachment', /// apple doing it's magic...
-                        'application/vnd.ms-excel',   /// sometimes windows reports csv as excel???
-                        'application/csv-tab-delimited-table', // windows again!!?
-                ))) { // weird tyeps..
-            $inf = pathinfo($this->filename);
-            $this->mimetype  = $y->fromExt($inf['extension']);
-        }
-        
-        $ext = $y->toExt(trim((string) $this->mimetype ));
-        
-        $this->filename = empty($this->filename) ? 
-            ('image-upload-' . date('Y-m-d H:i:s') . '.' . $ext) : ($this->filename); 
-        
         if (!$this->createFromData($data)) {
             return false;
         }