parent
e1f69b26af
commit
f7cb923ceb
|
@ -115,7 +115,8 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
$file = CcFilesQuery::create()->findPk($id);
|
$file = CcFilesQuery::create()->findPk($id);
|
||||||
if ($file)
|
if ($file)
|
||||||
{
|
{
|
||||||
$fileFromJson = json_decode($this->getRequest()->getRawBody(), true);
|
$fileFromJson = $file->fromArray($this->validateRequestData(json_decode($this->getRequest()->getRawBody(), true)),
|
||||||
|
BasePeer::TYPE_FIELDNAME);
|
||||||
|
|
||||||
//Our RESTful API takes "full_path" as a field, which we then split and translate to match
|
//Our RESTful API takes "full_path" as a field, which we then split and translate to match
|
||||||
//our internal schema. Internally, file path is stored relative to a directory, with the directory
|
//our internal schema. Internally, file path is stored relative to a directory, with the directory
|
||||||
|
@ -136,7 +137,6 @@ class Rest_MediaController extends Zend_Rest_Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$file->fromArray($this->validateRequestData(json_decode($fileFromJson, true)), BasePeer::TYPE_FIELDNAME);
|
|
||||||
$now = new DateTime("now", new DateTimeZone("UTC"));
|
$now = new DateTime("now", new DateTimeZone("UTC"));
|
||||||
$file->setDbMtime($now);
|
$file->setDbMtime($now);
|
||||||
$file->save();
|
$file->save();
|
||||||
|
|
Loading…
Reference in New Issue