$roo->jok($r->URL(-1,'/Images') . '#attachment-'. $r->id);
}
- if(isset($q['_auto_save'])){
- require_once 'System.php';
-
- $tmpdir = System::mktemp("-d auto_save");
-
- $path = $tmpdir . '/' . time();
-
- $source = array(
- 'source' => $q['_source']
- );
-
- if(!file_exists($path)){
- file_put_contents($path, json_encode($source));
- }
-
- $this->setFrom($q);
-
- if (!$this->createFrom($path)) {
- $roo->jerr("error on auto save making image");
- }
-
- $roo->addEvent("AUTOSAVE", $this, $this->toEventString());
-
- $roo->jok("OK");
- }
-
}
if (!empty($mime_like)) {
$c->whereAdd("Images.mimetype LIKE '". $c->escape($mime_like) ."'");
}
+ $c->orderBy('created DESC');
return $c->fetchAll();
}