projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e422e07
)
DataObjects/Images.php
author
edward
<edward@roojs.com>
Thu, 21 Jan 2016 05:36:02 +0000
(13:36 +0800)
committer
edward
<edward@roojs.com>
Thu, 21 Jan 2016 05:36:02 +0000
(13:36 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
3115288
..
88fdd94
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-715,41
+715,23
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
// $this->filesize = filesize($file);
$this->created = date('Y-m-d H:i:s');
// $this->filesize = filesize($file);
$this->created = date('Y-m-d H:i:s');
-
-
- if (empty($this->filename)) {
- $this->filename = basename($filename);
- }
- //DB_DataObject::debugLevel(1);
if (!$this->id) {
$this->insert();
} else {
$this->update();
}
if (!$this->id) {
$this->insert();
} else {
$this->update();
}
-
-
$f = $this->getStoreName();
$dest = dirname($f);
if (!file_exists($dest)) {
$f = $this->getStoreName();
$dest = dirname($f);
if (!file_exists($dest)) {
- // currently this is 0775 due to problems using shared hosing (FTP)
- // it makes all the files unaccessable..
- // you can normally solve this by giving the storedirectory better perms
- // if needed on a dedicated server..
$oldumask = umask(0);
mkdir($dest, 0775, true);
umask($oldumask);
}
$oldumask = umask(0);
mkdir($dest, 0775, true);
umask($oldumask);
}
- copy($file,$f);
-
- // fill in details..
+ file_put_contents($f, file_get_contents("data://" . $data));
- /* thumbnails */
-
-
- // $this->createThumbnail(0,50);
return true;
}
return true;
}