projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3da9727
)
DataObjects/Images.php
author
edward
<edward@roojs.com>
Thu, 21 Jan 2016 05:25:37 +0000
(13:25 +0800)
committer
edward
<edward@roojs.com>
Thu, 21 Jan 2016 05:25:37 +0000
(13:25 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
6a3527d
..
7668d6e
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-673,7
+673,7
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
require_once 'File/MimeType.php';
$y = new File_MimeType();
require_once 'File/MimeType.php';
$y = new File_MimeType();
- $this->mimetype = $filetype;
+
if (in_array($this->mimetype, array(
'text/application',
'application/octet-stream',
if (in_array($this->mimetype, array(
'text/application',
'application/octet-stream',
@@
-683,14
+683,14
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
'application/vnd.ms-excel', /// sometimes windows reports csv as excel???
'application/csv-tab-delimited-table', // windows again!!?
))) { // weird tyeps..
'application/vnd.ms-excel', /// sometimes windows reports csv as excel???
'application/csv-tab-delimited-table', // windows again!!?
))) { // weird tyeps..
- $inf = pathinfo($filename);
+ $inf = pathinfo($
this->
filename);
$this->mimetype = $y->fromExt($inf['extension']);
}
$ext = $y->toExt(trim((string) $this->mimetype ));
$this->filename = empty($this->filename) ?
$this->mimetype = $y->fromExt($inf['extension']);
}
$ext = $y->toExt(trim((string) $this->mimetype ));
$this->filename = empty($this->filename) ?
-
$_FILES['imageUpload']['name']
: ($this->filename .'.'. $ext);
+
('gen-' . date('Y-m-d H:i:s') . '.' . $ext)
: ($this->filename .'.'. $ext);