Commit 000be5bc authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Ajout des préfixes pour les fichiers stockées dans le repertoire tmp

parent 4cbc442c
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/src/Application/Command/TruncateAndMergeCommand.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ class TruncateAndMergeCommand extends AbstractCommand {
        $couverture = $inputFilePath['couverture'];
        $manuscrit = $inputFilePath['manuscrit'];

        $tmpFilePath = sys_get_temp_dir() . '/' . uniqid() . '.pdf';
        $tmpFilePath = sys_get_temp_dir() . '/sygal_trunc_' . uniqid() . '.pdf';

        $command = $this->executable . ' ' . $this->noCompressionOption;
//        $command .= ' ' . '-dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $outputFilePath . ' -dBATCH ' . $couverture . ' -dFirstPage=2 -dBATCH ' . $manuscrit;
+4 −4
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -520,7 +520,7 @@ class FichierService extends BaseService
            return Util::createImageWithText("Erreur: extension PHP |'imagick' non chargée", 170, 100);
        }

        $outputFilePath = sys_get_temp_dir() . '/' . uniqid() . '.png';
        $outputFilePath = sys_get_temp_dir() . '/sygal_preview_' . uniqid() . '.png';

        try {
            $im = new \Imagick();
@@ -757,7 +757,7 @@ class FichierService extends BaseService

    private function generateOutputFilePathForMerge(These $these)
    {
        $outputFilePath = sprintf("%s-%s-%s-merged.pdf",
        $outputFilePath = sprintf("sygal_fusion_%s-%s-%s.pdf",
            $these->getId(),
            $these->getDoctorant()->getIndividu()->getNomUsuel(),
            $these->getDoctorant()->getIndividu()->getPrenom()
@@ -777,7 +777,7 @@ class FichierService extends BaseService
    private function instantiateCommandForMerge(These $these, $versionFichier, $removeFirstPage, $outputFilePath)
    {
        // GENERATION DE LA COUVERTURE
        $filename = "COUVERTURE_" . $these->getId() . "_" . uniqid() . ".pdf";
        $filename = "sygal_couverture_" . $these->getId() . "_" . uniqid() . ".pdf";
        $this->generatePageDeCouverture($these, $this->renderer, $filename);

        // RECUPERATION DE LA BONNE VERSION DU MANUSCRIPT
@@ -797,7 +797,7 @@ class FichierService extends BaseService
        }

        $command->generate($outputFilePath, $inputFiles, $errorFilePath);
        unlink($inputFiles['couverture']);
        //unlink($inputFiles['couverture']);

        return $command;
    }