mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 15:14:58 +00:00
allow 'xxx/*' and '*' as wild card mimetypes
This commit is contained in:
parent
5cbaf0e7a8
commit
e5ee075a2d
|
@ -89,8 +89,13 @@ class SeedDMS_Preview_PdfPreviewer extends SeedDMS_Preview_Base {
|
|||
$target = $this->previewDir.$dir.md5($infile);
|
||||
if($target != '' && (!file_exists($target.'.pdf') || filectime($target.'.pdf') < filectime($infile))) {
|
||||
$cmd = '';
|
||||
$mimeparts = explode('/', $mimetype, 2);
|
||||
if(isset($this->converters[$mimetype])) {
|
||||
$cmd = str_replace(array('%f', '%o'), array($infile, $target.'.pdf'), $this->converters[$mimetype]);
|
||||
$cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters[$mimetype]);
|
||||
} elseif(isset($this->converters[$mimeparts[0].'/*'])) {
|
||||
$cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters[$mimeparts[0].'/*']);
|
||||
} elseif(isset($this->converters['*'])) {
|
||||
$cmd = str_replace(array('%f', '%o', '%m'), array($infile, $target.'.pdf', $mimetype), $this->converters['*']);
|
||||
}
|
||||
if($cmd) {
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue
Block a user