use the conversion manager for preview images

This commit is contained in:
Uwe Steinmann 2022-09-07 17:09:57 +02:00
parent 1e26bc181b
commit 12599bd712
3 changed files with 10 additions and 0 deletions

View File

@ -58,6 +58,7 @@ if($view) {
$view->setParam('dms', $dms);
$view->setParam('user', $user);
$view->setParam('accessobject', $accessop);
$view->setParam('conversionmgr', $conversionmgr);
$view->setParam('onepage', $settings->_onePageMode); // do most navigation by reloading areas of pages with ajax
$view->setParam('showtree', showtree());
$view->setParam('fromdate', isset($_GET['fromdate']) ? $_GET['fromdate'] : '');
@ -68,6 +69,7 @@ if($view) {
$view->setParam('cachedir', $settings->_cacheDir);
$view->setParam('previewWidthList', $settings->_previewWidthList);
$view->setParam('previewWidthDetail', $settings->_previewWidthDetail);
$view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array());
$view->setParam('timeout', $settings->_cmdTimeout);
$view->setParam('xsendfile', $settings->_enableXsendfile);
$view($_GET);

View File

@ -41,6 +41,8 @@ class SeedDMS_View_Timeline extends SeedDMS_Theme_Style {
$document = $this->params['document'];
$version = $this->params['version'];
$cachedir = $this->params['cachedir'];
$conversionmgr = $this->params['conversionmgr'];
$previewconverters = $this->params['previewConverters'];
$previewwidthlist = $this->params['previewWidthList'];
$previewwidthdetail = $this->params['previewWidthDetail'];
$timeout = $this->params['timeout'];
@ -50,6 +52,10 @@ class SeedDMS_View_Timeline extends SeedDMS_Theme_Style {
print $this->folderListHeader();
print "<tbody>\n";
$previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidthdetail, $timeout, $xsendfile);
if($conversionmgr)
$previewer->setConversionMgr($conversionmgr);
else
$previewer->setConverters($previewconverters);
$extracontent = array();
$extracontent['below_title'] = $this->getListRowPath($document);
echo $this->documentListRow($document, $previewer, 0, false, $extracontent);

View File

@ -130,6 +130,8 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Theme_Style {
$cachedir = $this->params['cachedir'];
$conversionmgr = $this->params['conversionmgr'];
$previewconverters = $this->params['previewConverters'];
$previewwidthlist = $this->params['previewWidthList'];
$previewwidthdetail = $this->params['previewWidthDetail'];
$timeout = $this->params['timeout'];
$xsendfile = $this->params['xsendfile'];
$document = $this->params['document'];