fix creation of preview if SeedDMS_Core_DocumentContent has been derived

This commit is contained in:
Uwe Steinmann 2018-03-08 15:13:17 +01:00
parent 00429e6e3a
commit 7f2dd8513f
2 changed files with 23 additions and 6 deletions

View File

@ -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":

View File

@ -11,10 +11,10 @@
<email>uwe@steinmann.cx</email>
<active>yes</active>
</lead>
<date>2018-01-18</date>
<date>2018-03-08</date>
<time>10:59:39</time>
<version>
<release>1.2.7</release>
<release>1.2.8</release>
<api>1.2.0</api>
</version>
<stability>
@ -23,9 +23,7 @@
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
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
</notes>
<contents>
<dir baseinstalldir="SeedDMS" name="/">
@ -354,5 +352,23 @@ SeedDMS_Preview_Base::setConverters() overrides existing converters.
New method SeedDMS_Preview_Base::addConverters() merges new converters with old ones.
</notes>
</release>
<release>
<date>2018-01-18</date>
<time>10:59:39</time>
<version>
<release>1.2.7</release>
<api>1.2.0</api>
</version>
<stability>
<release>stable</release>
<api>stable</api>
</stability>
<license uri="http://opensource.org/licenses/gpl-license">GPL License</license>
<notes>
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
</notes>
</release>
</changelog>
</package>