Commit 7744d3c3 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Abandon de la fonction tmpname() mal utilisée.

parent 988c8401
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class AjoutPdcShellCommandGs extends PdfMergeShellCommandGs

    public function generateCommandLineAvecSuppression1erePageDuManuscrit()
    {
        $tmpFilePath = tempnam(sys_get_temp_dir(), $this->getName() . '_trunc_') . '.pdf';
        $tmpFilePath = sys_get_temp_dir() . '/' . uniqid($this->getName() . '_trunc_') . '.pdf';

        $command = $this->executable . ' ' . $this->noCompressionOption;
        $command1 = $command . ' -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=' . $tmpFilePath . ' -dFirstPage=2 -dBATCH ' . $this->manuscritInputFilePath;
+1 −1
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ class FileUtils

    static public function convertLogoFileToPNG(string $uploadedFilePath): string
    {
        $logoFilepath = tempnam(sys_get_temp_dir(), '') . '.png';
        $logoFilepath = sys_get_temp_dir() . '/' . uniqid() . '.png';

        $command = new ConvertShellCommand();
        $command->setOutputFilePath($logoFilepath);
+6 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ class FichierStorageService
        $this->storageAdapter->saveToFilesystem(
            $dirPath,
            $fileName,
            $tmpFilePath = tempnam(sys_get_temp_dir(), '')
            $tmpFilePath = sys_get_temp_dir() . '/' . uniqid()
        );

        return $tmpFilePath;
@@ -222,7 +222,11 @@ class FichierStorageService
        $dirPath = $this->computeDirectoryPathForLogoStructure($structure);
        $fileName = $structure->getCheminLogo();

        $this->storageAdapter->saveToFilesystem($dirPath, $fileName, $tmpFilePath = tempnam(sys_get_temp_dir(), ''));
        $this->storageAdapter->saveToFilesystem(
            $dirPath,
            $fileName,
            $tmpFilePath = sys_get_temp_dir() . '/' . uniqid()
        );

        return $tmpFilePath;
    }