return false;
}
- if (!empty($this->imgtype) && $this->imgtype[0] == '-' && !empty($this->onid)) {
+ if (empty($this->id) && !empty($this->imgtype) && $this->imgtype[0] == '-' && !empty($this->onid)) {
$img = DB_DataObject::factory('Images');
$img->onid = $this->onid;
$img->ontable = $this->ontable;
if (array_shift(explode('/', $this->mimetype)) == 'image') {
- $imgs = @getimagesize($file);
- print_R($imgs);exit;
+ $imgs = @getimagesize($data);
+
if (!empty($imgs) && !empty($imgs[0]) && !empty($imgs[1])) {
list($this->width , $this->height) = $imgs;
}