Skip to content
Snippets Groups Projects
Commit cad573f2 authored by Giovannoni Laurent's avatar Giovannoni Laurent
Browse files

FEAT #5549 simple_attachment type on WS

parent b43a3371
No related branches found
No related tags found
No related merge requests found
......@@ -115,7 +115,8 @@ class resources_controler
$data,
$storeResult['docserver_id'],
$status,
$fileFormat
$fileFormat,
$table
);
unlink($Fnm);
//var_dump($data);exit;
......@@ -156,7 +157,7 @@ class resources_controler
}
}
private function prepareStorage($data, $docserverId, $status, $fileFormat)
private function prepareStorage($data, $docserverId, $status, $fileFormat, $table)
{
$statusFound = false;
$typistFound = false;
......@@ -165,6 +166,7 @@ class resources_controler
$userPrimaryEntity = false;
$destinationFound = false;
$initiatorFound = false;
$attachmentTypeFound = false;
$db = new Database();
for ($i=0;$i<count($data);$i++) {
if (strtoupper($data[$i]['type']) == 'INTEGER' || strtoupper($data[$i]['type']) == 'FLOAT') {
......@@ -217,6 +219,9 @@ class resources_controler
}
}
if (strtoupper($data[$i]['column']) == strtoupper('attachment_type')) {
$attachmentTypeFound = true;
}
}
if (!$typistFound && !$toAddressFound) {
array_push(
......@@ -307,7 +312,19 @@ class resources_controler
)
);
}
}
}
if (!$attachmentTypeFound && $table == 'res_attachments') {
array_push(
$data,
array(
'column' => 'attachment_type',
'value' => 'simple_attachment',
'type' => 'string',
)
);
}
array_push(
$data,
array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment