call hook 'filenameDownloadItem' in search export and transmittal download

This commit is contained in:
Uwe Steinmann 2022-03-25 08:44:32 +01:00
parent 11942c825d
commit 6de426bbc3
3 changed files with 7 additions and 4 deletions

View File

@ -5,6 +5,7 @@
- merge changes up to 5.1.25
- fix sending trigger workflow notification (Closes: #522)
- fix updating und deleting items in document lists
- call hook 'filenameDownloadItem' in search export and transmittal download
--------------------------------------------------------------------------------
Changes in version 6.0.17

View File

@ -39,10 +39,11 @@ class SeedDMS_Controller_TransmittalDownload extends SeedDMS_Controller_Common {
$document = $content->getDocument();
if ($document->getAccessMode($user) >= M_READ) {
$extracols = $this->callHook('extraDownloadColumns', $document);
$filename = $this->callHook('filenameDownloadItem', $content);
if($rawcontent = $this->callHook('rawcontent', $content)) {
$downmgr->addItem($content, $extracols, $rawcontent);
$downmgr->addItem($content, $extracols, $rawcontent, $filename);
} else
$downmgr->addItem($content, $extracols);
$downmgr->addItem($content, $extracols, null, $filename);
}
}

View File

@ -92,10 +92,11 @@ $(document).ready(function() {
foreach($entries as $entry) {
if($entry->isType('document')) {
$extracols = $this->callHook('extraDownloadColumns', $entry);
$filename = $this->callHook('filenameDownloadItem', $entry->getLatestContent());
if($includecontent && $rawcontent = $this->callHook('rawcontent', $entry->getLatestContent())) {
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent);
$downmgr->addItem($entry->getLatestContent(), $extracols, $rawcontent, $filename);
} else
$downmgr->addItem($entry->getLatestContent(), $extracols);
$downmgr->addItem($entry->getLatestContent(), $extracols, null, $filename);
}
}
$filename = tempnam(sys_get_temp_dir(), '');