From d69705b2e30a36610b5680afac4c26e3b3b8f6ae Mon Sep 17 00:00:00 2001 From: edward Date: Thu, 21 Jan 2016 14:43:59 +0800 Subject: [PATCH] DataObjects/Images.php --- DataObjects/Images.php | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/DataObjects/Images.php b/DataObjects/Images.php index b52bfbb1..154067bd 100644 --- a/DataObjects/Images.php +++ b/DataObjects/Images.php @@ -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; } -- 2.39.2