mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-06-18 02:59:27 +00:00
set cmd to class name of conversion service
This commit is contained in:
parent
bb10ff084b
commit
be2de9cfc1
|
@ -182,11 +182,14 @@ class SeedDMS_Lucene_IndexedDocument extends Zend_Search_Lucene_Document {
|
||||||
$mimetype = $version->getMimeType();
|
$mimetype = $version->getMimeType();
|
||||||
$this->mimetype = $mimetype;
|
$this->mimetype = $mimetype;
|
||||||
if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
|
if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
|
||||||
if($convcmd->hasService($mimetype, 'text/plain')) {
|
if($service = $convcmd->getService($mimetype, 'text/plain')) {
|
||||||
$content = $convcmd->convert($path, $mimetype, 'text/plain');
|
$content = $convcmd->convert($path, $mimetype, 'text/plain');
|
||||||
if($content) {
|
if($content) {
|
||||||
self::setContent($content);
|
self::setContent($content);
|
||||||
}
|
}
|
||||||
|
$this->cmd = get_class($service);
|
||||||
|
} else {
|
||||||
|
$this->cmd = 'No service to convert '.$mimetype.' to text/plain';
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$content = '';
|
$content = '';
|
||||||
|
|
|
@ -182,12 +182,12 @@ class SeedDMS_SQLiteFTS_IndexedDocument extends SeedDMS_SQLiteFTS_Document {
|
||||||
$mimetype = $version->getMimeType();
|
$mimetype = $version->getMimeType();
|
||||||
$this->mimetype = $mimetype;
|
$this->mimetype = $mimetype;
|
||||||
if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
|
if(is_object($convcmd) && (get_class($convcmd) == 'SeedDMS_ConversionMgr')) {
|
||||||
if($convcmd->hasService($mimetype, 'text/plain')) {
|
if($service = $convcmd->getService($mimetype, 'text/plain')) {
|
||||||
$content = $convcmd->convert($path, $mimetype, 'text/plain');
|
$content = $convcmd->convert($path, $mimetype, 'text/plain');
|
||||||
if($content) {
|
if($content) {
|
||||||
self::setContent($content);
|
self::setContent($content);
|
||||||
}
|
}
|
||||||
$this->cmd = get_class($convcmd);
|
$this->cmd = get_class($service);
|
||||||
} else {
|
} else {
|
||||||
$this->cmd = 'No service to convert '.$mimetype.' to text/plain';
|
$this->cmd = 'No service to convert '.$mimetype.' to text/plain';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user