Skip to content

Commit

Permalink
Merge pull request #9784 from josh4trunks/libreoffice_match_cl
Browse files Browse the repository at this point in the history
Cleanup Document Preview
  • Loading branch information
DeepDiver1975 committed Jul 28, 2014
2 parents 1b5d31a + acd5660 commit 539d2b7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/private/preview/office-cl.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,12 @@ public function getThumbnail($path, $maxX, $maxY, $scalingup, $fileview) {

$tmpDir = get_temp_dir();

$defaultParameters = ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ';
$defaultParameters = ' -env:UserInstallation=file://' . escapeshellarg($tmpDir) . ' --headless --nologo --nofirststartwizard --invisible --norestore -convert-to pdf -outdir ';
$clParameters = \OCP\Config::getSystemValue('preview_office_cl_parameters', $defaultParameters);

$exec = $this->cmd . $clParameters . escapeshellarg($tmpDir) . ' ' . escapeshellarg($absPath);
$export = 'export HOME=/' . $tmpDir;

shell_exec($export . "\n" . $exec);
shell_exec($exec);

//create imagick object from pdf
try{
Expand Down

0 comments on commit 539d2b7

Please sign in to comment.