if (!empty($mime_like)) {
$c->whereAdd("Images.mimetype LIKE '". $c->escape($mime_like) ."'");
}
+ $c->orderBy('created DESC');
return $c->fetchAll();
}
$fc = $this->toFileConvert();
// print_r($size);
// exit;
- $fc->convert($this->mimetype, $size);
+ $mt = $this->mimetype;
+ if (!preg_match('#^image/#i',$mt)) {
+ $mt = 'image/jpeg';
+ }
+ $fc->convert($mt, $size);
return $baseURL . $provider . "/$size/{$this->id}/{$this->filename}";
}
function setFromRoo($ar, $roo)
{
// not sure why we do this..
- print_r('setFromRoo');exit;
+
// if imgtype starts with '-' ? then we set the 'old' (probably to delete later)
if (!empty($ar['imgtype']) && !empty($ar['ontable']) && !empty($ar['onid']) && ($ar['imgtype'][0] == '-')) {
$this->setFrom($ar);