From 7f2dd8513fac02e92679585f311cf0764f168545 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 8 Mar 2018 15:13:17 +0100 Subject: [PATCH] fix creation of preview if SeedDMS_Core_DocumentContent has been derived --- SeedDMS_Preview/Preview/Previewer.php | 3 ++- SeedDMS_Preview/package.xml | 26 +++++++++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php index b9ed617ac..23c5a97de 100644 --- a/SeedDMS_Preview/Preview/Previewer.php +++ b/SeedDMS_Preview/Preview/Previewer.php @@ -57,9 +57,10 @@ class SeedDMS_Preview_Previewer extends SeedDMS_Preview_Base { return false; $document = $object->getDocument(); + $dms = $document->_dms; $dir = $this->previewDir.'/'.$document->getDir(); switch(get_class($object)) { - case "SeedDMS_Core_DocumentContent": + case $dms->getClassname('documentcontent'): $target = $dir.'p'.$object->getVersion().'-'.$width; break; case "SeedDMS_Core_DocumentFile": diff --git a/SeedDMS_Preview/package.xml b/SeedDMS_Preview/package.xml index e446eaf34..2afd6da7b 100644 --- a/SeedDMS_Preview/package.xml +++ b/SeedDMS_Preview/package.xml @@ -11,10 +11,10 @@ uwe@steinmann.cx yes - 2018-01-18 + 2018-03-08 - 1.2.7 + 1.2.8 1.2.0 @@ -23,9 +23,7 @@ GPL License -add SeedDMS_Preview_Base::sendFile() as a replacement for readfile() which uses -mod_xsendfile if available -execWithTimeout() reads data from stderr and returns it together with stdout in array +preview is also created if SeedDMS_Core_DocumentContent has a child class @@ -354,5 +352,23 @@ SeedDMS_Preview_Base::setConverters() overrides existing converters. New method SeedDMS_Preview_Base::addConverters() merges new converters with old ones. + + 2018-01-18 + + + 1.2.7 + 1.2.0 + + + stable + stable + + GPL License + +add SeedDMS_Preview_Base::sendFile() as a replacement for readfile() which uses +mod_xsendfile if available +execWithTimeout() reads data from stderr and returns it together with stdout in array + +