mirror of
https://git.code.sf.net/p/seeddms/code
synced 2024-11-26 23:42:11 +00:00
pass content instead of document to preview hooks
This commit is contained in:
parent
259c7ffc3c
commit
db0021d65b
|
@ -174,11 +174,11 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
if(!$showfullpreview)
|
||||
return;
|
||||
|
||||
$txt = $this->callHook('preDocumentPreview', $document);
|
||||
$latestContent = $document->getLatestContent();
|
||||
$txt = $this->callHook('preDocumentPreview', $latestContent);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
else {
|
||||
$latestContent = $document->getLatestContent();
|
||||
switch($latestContent->getMimeType()) {
|
||||
case 'audio/mpeg':
|
||||
case 'audio/mp3':
|
||||
|
@ -204,13 +204,13 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
|||
<?php
|
||||
break;
|
||||
default:
|
||||
$txt = $this->callHook('additionalDocumentPreview', $document);
|
||||
$txt = $this->callHook('additionalDocumentPreview', $latestContent);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$txt = $this->callHook('postDocumentPreview', $document);
|
||||
$txt = $this->callHook('postDocumentPreview', $latestContent);
|
||||
if(is_string($txt))
|
||||
echo $txt;
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user