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