mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-09-09 11:29:01 +00:00
replace %m in converter cmd with mimetype
This commit is contained in:
parent
fbfa2a2132
commit
5cbaf0e7a8
|
@ -108,11 +108,11 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base {
|
||||||
$cmd = '';
|
$cmd = '';
|
||||||
$mimeparts = explode('/', $mimetype, 2);
|
$mimeparts = explode('/', $mimetype, 2);
|
||||||
if(isset($this->converters[$mimetype])) {
|
if(isset($this->converters[$mimetype])) {
|
||||||
$cmd = str_replace(array('%w', '%f', '%o'), array($width, $infile, $target.'.png'), $this->converters[$mimetype]);
|
$cmd = str_replace(array('%w', '%f', '%o', '%m'), array($width, $infile, $target.'.png', $mimetype), $this->converters[$mimetype]);
|
||||||
} elseif(isset($this->converters[$mimeparts[0].'/*'])) {
|
} elseif(isset($this->converters[$mimeparts[0].'/*'])) {
|
||||||
$cmd = str_replace(array('%w', '%f', '%o'), array($width, $infile, $target.'.png'), $this->converters[$mimeparts[0].'/*']);
|
$cmd = str_replace(array('%w', '%f', '%o', '%m'), array($width, $infile, $target.'.png', $mimetype), $this->converters[$mimeparts[0].'/*']);
|
||||||
} elseif(isset($this->converters['*'])) {
|
} elseif(isset($this->converters['*'])) {
|
||||||
$cmd = str_replace(array('%w', '%f', '%o'), array($width, $infile, $target.'.png'), $this->converters['*']);
|
$cmd = str_replace(array('%w', '%f', '%o', '%m'), array($width, $infile, $target.'.png', $mimetype), $this->converters['*']);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user