Skip to content
Snippets Groups Projects
Commit dd9918f5 authored by Quentin Ribac's avatar Quentin Ribac
Browse files

FIX #18282 TIME 0:15 rm useless code

parent 95d26b96
No related branches found
No related tags found
No related merge requests found
...@@ -445,19 +445,9 @@ class ResController extends ResourceControlController ...@@ -445,19 +445,9 @@ class ResController extends ResourceControlController
$creatorId = $document['typist']; $creatorId = $document['typist'];
$subject = $document['subject']; $subject = $document['subject'];
$signedDocument = AdrModel::getDocuments([ $convertedDocument = ConvertPdfController::getConvertedPdfById(['resId' => $aArgs['resId'], 'collId' => 'letterbox_coll']);
'select' => ['id', 'docserver_id', 'path', 'filename', 'fingerprint'], if (!empty($convertedDocument['errors'])) {
'where' => ['res_id = ?', 'type = ?', 'version = ?'], return $response->withStatus(400)->withJson(['errors' => 'Conversion error : ' . $convertedDocument['errors']]);
'data' => [$args['resId'], 'SIGN', $document['version']],
'limit' => 1
]);
if (!empty($signedDocument[0]) && !empty($signedDocuments[0]['id'])) {
$convertedDocument = $signedDocument[0];
} else {
$convertedDocument = ConvertPdfController::getConvertedPdfById(['resId' => $aArgs['resId'], 'collId' => 'letterbox_coll']);
if (!empty($convertedDocument['errors'])) {
return $response->withStatus(400)->withJson(['errors' => 'Conversion error : ' . $convertedDocument['errors']]);
}
} }
$document = $convertedDocument; $document = $convertedDocument;
......
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