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 ...@@ -115,7 +115,8 @@ class resources_controler
$data, $data,
$storeResult['docserver_id'], $storeResult['docserver_id'],
$status, $status,
$fileFormat $fileFormat,
$table
); );
unlink($Fnm); unlink($Fnm);
//var_dump($data);exit; //var_dump($data);exit;
...@@ -156,7 +157,7 @@ class resources_controler ...@@ -156,7 +157,7 @@ class resources_controler
} }
} }
private function prepareStorage($data, $docserverId, $status, $fileFormat) private function prepareStorage($data, $docserverId, $status, $fileFormat, $table)
{ {
$statusFound = false; $statusFound = false;
$typistFound = false; $typistFound = false;
...@@ -165,6 +166,7 @@ class resources_controler ...@@ -165,6 +166,7 @@ class resources_controler
$userPrimaryEntity = false; $userPrimaryEntity = false;
$destinationFound = false; $destinationFound = false;
$initiatorFound = false; $initiatorFound = false;
$attachmentTypeFound = false;
$db = new Database(); $db = new Database();
for ($i=0;$i<count($data);$i++) { for ($i=0;$i<count($data);$i++) {
if (strtoupper($data[$i]['type']) == 'INTEGER' || strtoupper($data[$i]['type']) == 'FLOAT') { if (strtoupper($data[$i]['type']) == 'INTEGER' || strtoupper($data[$i]['type']) == 'FLOAT') {
...@@ -217,6 +219,9 @@ class resources_controler ...@@ -217,6 +219,9 @@ class resources_controler
} }
} }
if (strtoupper($data[$i]['column']) == strtoupper('attachment_type')) {
$attachmentTypeFound = true;
}
} }
if (!$typistFound && !$toAddressFound) { if (!$typistFound && !$toAddressFound) {
array_push( array_push(
...@@ -307,7 +312,19 @@ class resources_controler ...@@ -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( array_push(
$data, $data,
array( 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