Commit b9716014 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Usage du SODU pour unoconv retiré

parent b099ac62
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -69,16 +69,9 @@ class Document
    private $contentChanged = false;

    /**
     * Sous Debian, vous devrez autoriser www-data à utiliser unoconv avec sudo :
     *
     * $ visudo
     *
     * puis ajouter ceci:
     * www-data ALL=(ALL) NOPASSWD: /usr/bin/unoconv
     *
     * @var string
     */
    private $convCommand = 'sudo unoconv -f pdf -o :outputFile :inputFile';
    private $convCommand = 'unoconv -f pdf -o :outputFile :inputFile';

    /**
     * @var string
@@ -634,9 +627,8 @@ class Document

        $command = str_replace(':inputFile', $origine, $this->getConvCommand());
        $command = str_replace(':outputFile', $destination, $command);

        exec($command, $output, $return);
//        sleep(10);

        if (0 != $return) {
            throw new \Exception('La conversion de document en PDF a échoué');
        }