Project

General

Profile

Anomalie #15129

Updated by Emmanuel DILLARD over 1 year ago

status "FRZ" non mis Mise à jour mineure de maarch courrier 19.04.18 (à partir de 19.04.14) et maarch parapheur 19.09.06 (19.09.04) aurait arrêté le fonctionnement du retour des courriers signés dans Maarch parapheur à Maarch Courrier.

Ci-dessous les différences entre les fichiers du parapheur avant et après.

Lors du lancement du script retrieveMailFromExternalSignatoryBook.sh il n y a pas d'erreur explicites.

===================================================================================================
src/app/convert/controllers/ConvertThumbnailController.php
==========

[root@tstgec01 controllers]# diff ConvertThumbnailController.php ConvertThumbnailController.php_savetag190906
73,74c73,74
< $command = "gm convert -density 500x500 -quality 100 -background white +matte "
< . escapeshellarg($pathToDocument) . "[{$i}] " . escapeshellarg("{$tmpPath}{$fileNameOnTmp}.png");
---
> $command = ConvertThumbnailController::getConvertCommand() . " "
> . escapeshellarg($pathToDocument) . "[{$i}] " . escapeshellarg("{$tmpPath}{$fileNameOnTmp}.png");
77,81d76
<
< //$command = "convert -density 500x500 -quality 100 -background white -alpha remove "
< // . escapeshellarg($pathToDocument) . "[{$i}] " . escapeshellarg("{$tmpPath}{$fileNameOnTmp}.png");
< // exec($command.' 2>&1', $output, $return);
<
159,160c154,155
< $command ="gm convert -density 500x500 -quality 100 -background white +matte "
< . escapeshellarg($pathToDocument) . "[{$i}] " . escapeshellarg("{$tmpPath}{$fileNameOnTmp}.png");
---
> $command = ConvertThumbnailController::getConvertCommand() . " "
> . escapeshellarg($pathToDocument) . "[{$convertPage}] " . escapeshellarg("{$tmpPath}{$fileNameOnTmp}.png");
188a184,199
> }
>
> /**
> * [Choose between graphicImage and imageMagics]
> */
> public function getConvertCommand() {
>
> $command = 'gm version';
>
> exec($command.' 2>&1', $output, $return);
>
> if ($return !== 0) {
> return "convert -density 500x500 -quality 100 -background white -alpha remove";
> } else {
> return "gm convert -density 500x500 -quality 100 -background white +matte";
> }

===========================================================================
/var/www/html/MaarchParapheur/src/app/document/controllers
==================


[root@tstgec01 controllers]# diff DocumentController.php DocumentController.php_savetag190906
145c145,146
< return $response->withStatus(400)->withJson(['errors' => 'Document thumbnails do not exist']);
---
> $configPath = CoreConfigModel::getConfigPath();
> exec("php src/app/convert/scripts/ThumbnailScript.php '{$configPath}' {$args['id']} 'document' '{$GLOBALS['id']}' > /dev/null");
314,315c315,316
< require_once ($libDir . 'SetaPDF-FormFiller-Full/library/SetaPDF/Autoload.php');
< //file_put_contents("toto.txt",'test');
---
> require_once($libDir . 'SetaPDF-FormFiller-Full/library/SetaPDF/Autoload.php');
>
621c622,632
< return $response->withStatus(400)->withJson(['errors' => 'Document not found on docserver or not readable']);
---
> $configPath = CoreConfigModel::getConfigPath();
> exec("php src/app/convert/scripts/ThumbnailScript.php '{$configPath}' {$args['id']} 'document' '{$GLOBALS['id']}' {$args['page']} > /dev/null");
> $adr = AdrModel::getDocumentsAdr([
> 'select' => ['path', 'filename'],
> 'where' => ['main_document_id = ?', 'type = ?'],
> 'data' => [$args['id'], 'TNL' . $args['page']]
> ]);
> $pathToThumbnail = $docserver['path'] . $adr[0]['path'] . $adr[0]['filename'];
> if (!is_file($pathToThumbnail) || !is_readable($pathToThumbnail)) {
> return $response->withStatus(400)->withJson(['errors' => 'Document not found on docserver or not readable']);
> }

============================================================================================================

Back