projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
775cb8e
)
DataObjects/Images.php
author
Edward
<edward@roojs.com>
Tue, 15 Jan 2013 02:43:51 +0000
(10:43 +0800)
committer
Edward
<edward@roojs.com>
Tue, 15 Jan 2013 02:43:51 +0000
(10:43 +0800)
DataObjects/Images.php
patch
|
blob
|
history
diff --git
a/DataObjects/Images.php
b/DataObjects/Images.php
index
b5c9193
..
48a3544
100644
(file)
--- a/
DataObjects/Images.php
+++ b/
DataObjects/Images.php
@@
-59,14
+59,8
@@
class Pman_Core_DataObjects_Images extends DB_DataObject
if (isset($q['_remote_upload'])) {
require_once 'System.php';
$tmpdir = System::mktemp("-d remote_upload");
if (isset($q['_remote_upload'])) {
require_once 'System.php';
$tmpdir = System::mktemp("-d remote_upload");
-// $imageInfo = getimagesize($q['_remote_upload']);
-// require_once 'File/MimeType.php';
-// $y = new File_MimeType();
-// $ext = $y->toExt(trim((string) $imageInfo['mime'] ));
- print_r(parse_url($q['_remote_upload']));
- print_r(basename($q['_remote_upload']));
- exit;
- $path = $tmpdir . '/' . time() . '.' . $ext;
+
+ $path = $tmpdir . '/' . basename($q['_remote_upload']);
if(!file_exists($path)){
file_put_contents($path, file_get_contents($q['_remote_upload']));
}
if(!file_exists($path)){
file_put_contents($path, file_get_contents($q['_remote_upload']));
}