mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-10 11:33:17 +00:00
Phraseanet API bumps to 1.1
This commit is contained in:
@@ -25,7 +25,7 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected $version = '1.0';
|
||||
protected $version = '1.1';
|
||||
|
||||
/**
|
||||
* Appbox where the API works
|
||||
@@ -437,8 +437,19 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
try
|
||||
{
|
||||
$metadatas = $request->get('metadatas');
|
||||
|
||||
if (!is_array($metadatas))
|
||||
throw new Exception();
|
||||
{
|
||||
throw new Exception('Metadatas should be an array');
|
||||
}
|
||||
|
||||
foreach ($metadatas as $metadata)
|
||||
{
|
||||
if (!is_array($metadata))
|
||||
{
|
||||
throw new Exception('Each Metadata value should be an array');
|
||||
}
|
||||
}
|
||||
|
||||
$record->set_metadatas($metadatas);
|
||||
$result->set_datas(array("metadatas" => $this->list_record_caption($record->get_caption())));
|
||||
@@ -1101,7 +1112,6 @@ class API_V1_adapter extends API_V1_Abstract
|
||||
* @todo ajouter une option pour avoir les values serialisées
|
||||
* dans un cas multi
|
||||
*/
|
||||
|
||||
return array(
|
||||
'meta_id' => $value->getId()
|
||||
, 'meta_structure_id' => $field->get_meta_struct_id()
|
||||
|
Reference in New Issue
Block a user