projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
16a4da1
)
DataObjects/Images.php
author
Alan
<alan@roojs.com>
Mon, 10 Jan 2022 06:58:39 +0000
(14:58 +0800)
committer
Alan
<alan@roojs.com>
Mon, 10 Jan 2022 06:58:39 +0000
(14:58 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
6615ae1
..
9e7d288
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-847,8
+847,15
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
$bits = explode(";", $data);
$this->mimetype = $bits[0];
}
$bits = explode(";", $data);
$this->mimetype = $bits[0];
}
+ static $imgid = 1;
+ if (empty($this->filename)) {
+ require_once 'File/Mimetype.php';
+ $y = new File_MimeType();
+ $this->filename = 'image-'.$imgid++.'.'.$y->toExt($this->mimetype);
+ }
- $this->mimetype= strtolower($this->mimetype);
+
+ $this->mimetype = strtolower($this->mimetype);
$explode_mimetype = explode('/', $this->mimetype);
$explode_mimetype = explode('/', $this->mimetype);