|
@@ -320,7 +320,16 @@ class TripalContentService_v0_1 extends TripalWebService {
|
|
|
|
|
|
$values = array();
|
|
|
for ($i = 0; $i < count($items); $i++) {
|
|
|
- $values[$i] = $this->sanitizeFieldKeys($this->resource, $items[$i]['value'], $bundle, $service_path);
|
|
|
+ if (array_key_exists('value', $items[$i])) {
|
|
|
+ $values[$i] = $this->sanitizeFieldKeys($this->resource, $items[$i]['value'], $bundle, $service_path);
|
|
|
+ }
|
|
|
+ elseif ($field['type'] == 'image') {
|
|
|
+ $url = file_create_url($items[$i]['uri']);
|
|
|
+ $values[$i] = $this->sanitizeFieldKeys($this->resource, $url, $bundle, $service_path);
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ // TODO: handle this case.
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
if ($hide_fields == 'hide' and empty($values[0])) {
|