Skip to content
Snippets Groups Projects
Verified Commit 50dc4c50 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FEAT #8346 fix some errors

parent 50197a8c
No related branches found
No related tags found
No related merge requests found
......@@ -181,6 +181,10 @@ class AttachmentController
$pathToDocument = $docserver['path_template'] . str_replace('#', DIRECTORY_SEPARATOR, $document['path']) . $document['filename'];
if (!file_exists($pathToDocument)) {
return $response->withStatus(404)->withJson(['errors' => 'Attachment not found on docserver']);
}
$loadedXml = CoreConfigModel::getXmlLoaded(['path' => 'modules/attachments/xml/config.xml']);
if ($loadedXml) {
$watermark = (array)$loadedXml->CONFIG->watermark;
......
......@@ -335,6 +335,10 @@ class ResController
$pathToDocument = $docserver['path_template'] . str_replace('#', DIRECTORY_SEPARATOR, $document['path']) . $document['filename'];
if (!file_exists($pathToDocument)) {
return $response->withStatus(404)->withJson(['errors' => 'Document not found on docserver']);
}
$loadedXml = CoreConfigModel::getXmlLoaded(['path' => 'apps/maarch_entreprise/xml/features.xml']);
if ($loadedXml) {
$watermark = (array)$loadedXml->FEATURES->watermark;
......
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