Merge branch '3.6' of github.com:alchemy-fr/Phraseanet into 3.6

This commit is contained in:
Ysolyne Gresille
2012-03-08 17:27:47 +01:00
176 changed files with 16803 additions and 31803 deletions

View File

@@ -204,6 +204,25 @@ class API_V1_adapter extends API_V1_Abstract
return $result;
}
public function caption_records(Request $request, $databox_id, $record_id)
{
$result = new API_V1_result($request, $this);
$record = $this->appbox->get_databox($databox_id)->get_record($record_id);
$fields = $record->get_caption()->get_fields();
$ret = array();
foreach ($fields as $field)
{
$ret[$field->get_meta_struct_id()] = array(
'meta_structure_id' => $field->get_meta_struct_id()
, 'name' => $field->get_name()
, 'value' => $field->get_serialized_values(";")
);
}
$result->set_datas($ret);
return $result;
}
/**
* Get an API_V1_result containing the results of a records search
*