set $new when creating preview

This commit is contained in:
Uwe Steinmann 2023-01-02 12:26:48 +01:00
parent 0e55c95171
commit be62540c69

View File

@ -116,9 +116,11 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
} elseif(isset($this->converters['*'])) { } elseif(isset($this->converters['*'])) {
$cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters['*']); $cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters['*']);
} }
if($cmd) { if($cmd) {
try { try {
self::execWithTimeout($cmd, $this->timeout); self::execWithTimeout($cmd, $this->timeout);
$new = true;
} catch(Exception $e) { } catch(Exception $e) {
$this->lastpreviewfile = ''; $this->lastpreviewfile = '';
return false; return false;
@ -127,6 +129,7 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
} }
return true; return true;
} }
$new = false;
return true; return true;
} /* }}} */ } /* }}} */