mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
set $new when creating preview
This commit is contained in:
parent
0e55c95171
commit
be62540c69
|
@ -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;
|
||||||
|
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
Loading…
Reference in New Issue
Block a user