From d59a4c18c9f2a62793ee192ddde6a2fedf51733e Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Tue, 28 Nov 2023 10:23:08 +0100 Subject: [PATCH] use conversion manager --- out/out.Clipboard.php | 2 ++ views/bootstrap/class.Clipboard.php | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/out/out.Clipboard.php b/out/out.Clipboard.php index 4460a3012..3d5147f1b 100644 --- a/out/out.Clipboard.php +++ b/out/out.Clipboard.php @@ -43,7 +43,9 @@ if (isset($_GET["folderid"]) && is_numeric($_GET["folderid"])) { if($view) { $view->setParam('folder', $folder); + $view->setParam('conversionmgr', $conversionmgr); $view->setParam('previewWidthList', $settings->_previewWidthList); + $view->setParam('previewConverters', isset($settings->_converters['preview']) ? $settings->_converters['preview'] : array()); $view->setParam('timeout', $settings->_cmdTimeout); $view->setParam('xsendfile', $settings->_enableXsendfile); $view($_GET); diff --git a/views/bootstrap/class.Clipboard.php b/views/bootstrap/class.Clipboard.php index 0bbc0c7b0..3b75db496 100644 --- a/views/bootstrap/class.Clipboard.php +++ b/views/bootstrap/class.Clipboard.php @@ -159,11 +159,17 @@ class SeedDMS_View_Clipboard extends SeedDMS_Theme_Style { $dms = $this->params['dms']; $clipboard = $this->params['session']->getClipboard(); $cachedir = $this->params['cachedir']; + $conversionmgr = $this->params['conversionmgr']; $previewwidth = $this->params['previewWidthList']; + $previewconverters = $this->params['previewConverters']; $timeout = $this->params['timeout']; $xsendfile = $this->params['xsendfile']; $previewer = new SeedDMS_Preview_Previewer($cachedir, $previewwidth, $timeout, $xsendfile); + if($conversionmgr) + $previewer->setConversionMgr($conversionmgr); + else + $previewer->setConverters($previewconverters); $content = ''; $txt = $this->callHook('preClipboard', $clipboard); if(is_string($txt))