mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 15:32:13 +00:00
allow wildcard in mimetypes of converters
This commit is contained in:
parent
7bd625c8fb
commit
2a08a3bbaf
|
@ -129,10 +129,17 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
|||
if($version && !$nocontent) {
|
||||
$path = $dms->contentDir . $version->getPath();
|
||||
$content = '';
|
||||
$fp = null;
|
||||
$mimetype = $version->getMimeType();
|
||||
$cmd = '';
|
||||
$mimeparts = explode('/', $mimetype, 2);
|
||||
if(isset($_convcmd[$mimetype])) {
|
||||
$cmd = sprintf($_convcmd[$mimetype], $path);
|
||||
} elseif(isset($_convcmd[$mimeparts[0].'/*'])) {
|
||||
$cmd = sprintf($_convcmd[$mimetype], $path);
|
||||
} elseif(isset($_convcmd['*'])) {
|
||||
$cmd = sprintf($_convcmd[$mimetype], $path);
|
||||
}
|
||||
if($cmd) {
|
||||
try {
|
||||
$content = self::execWithTimeout($cmd, $timeout);
|
||||
if($content) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user