Skip to content
Snippets Groups Projects
Verified Commit 22291f4e authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #15049 TIME 2 Docs + fixes

parent 943b868b
No related branches found
No related tags found
No related merge requests found
...@@ -351,6 +351,15 @@ function Bt_purgeAll($args = []) ...@@ -351,6 +351,15 @@ function Bt_purgeAll($args = [])
'where' => ['note_id in (select id from notes where identifier in (?))'], 'where' => ['note_id in (select id from notes where identifier in (?))'],
'data' => [$args['resources']] 'data' => [$args['resources']]
]); ]);
$linkedResources = implode("' - '", $args['resources']);
\SrcCore\models\DatabaseModel::update([
'table' => 'res_letterbox',
'postSet' => ['linked_resources' => "linked_resources - '{$linkedResources}'"],
'where' => ['linked_resources != ?'],
'data' => ['[]']
]);
\SrcCore\models\DatabaseModel::delete([ \SrcCore\models\DatabaseModel::delete([
'table' => 'adr_attachments', 'table' => 'adr_attachments',
'where' => ['res_id in (select res_id from res_attachments where res_id_master in (?))'], 'where' => ['res_id in (select res_id from res_attachments where res_id_master in (?))'],
......
...@@ -75,7 +75,6 @@ if (empty($file)) { ...@@ -75,7 +75,6 @@ if (empty($file)) {
$config = $file['config']; $config = $file['config'];
$GLOBALS['MaarchDirectory'] = $config['maarchDirectory']; $GLOBALS['MaarchDirectory'] = $config['maarchDirectory'];
$GLOBALS['customId'] = $config['customID']; $GLOBALS['customId'] = $config['customID'];
$GLOBALS['applicationUrl'] = $config['maarchUrl'];
$GLOBALS['batchDirectory'] = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda'; $GLOBALS['batchDirectory'] = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda';
$config = $file['exportSeda']; $config = $file['exportSeda'];
...@@ -171,6 +170,10 @@ foreach ($unitIdentifiers as $reference => $value) { ...@@ -171,6 +170,10 @@ foreach ($unitIdentifiers as $reference => $value) {
Bt_writeLog(['level' => 'ERROR', 'message' => '[storeAttachment] ' . $id['errors']]); Bt_writeLog(['level' => 'ERROR', 'message' => '[storeAttachment] ' . $id['errors']]);
continue; continue;
} }
\Convert\controllers\ConvertPdfController::convert([
'resId' => $id,
'collId' => 'attachments_coll'
]);
$status = (strpos((string)$messages['xmlContent']->ReplyCode, 'OOO')) === false ? $GLOBALS['statusReplyRejected'] : $GLOBALS['statusReplyReceived']; $status = (strpos((string)$messages['xmlContent']->ReplyCode, 'OOO')) === false ? $GLOBALS['statusReplyRejected'] : $GLOBALS['statusReplyReceived'];
\Resource\models\ResModel::update([ \Resource\models\ResModel::update([
'set' => ['status' => $status], 'set' => ['status' => $status],
......
...@@ -75,7 +75,6 @@ if (empty($file)) { ...@@ -75,7 +75,6 @@ if (empty($file)) {
$config = $file['config']; $config = $file['config'];
$GLOBALS['MaarchDirectory'] = $config['maarchDirectory']; $GLOBALS['MaarchDirectory'] = $config['maarchDirectory'];
$GLOBALS['customId'] = $config['customID']; $GLOBALS['customId'] = $config['customID'];
$GLOBALS['applicationUrl'] = $config['maarchUrl'];
$GLOBALS['batchDirectory'] = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda'; $GLOBALS['batchDirectory'] = $GLOBALS['MaarchDirectory'] . 'bin/exportSeda';
$config = $file['exportSeda']; $config = $file['exportSeda'];
......
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