add new hook cleanUpDocument

This commit is contained in:
Uwe Steinmann 2022-04-14 16:59:42 +02:00
parent 7a0f2a784e
commit 0198955905
3 changed files with 7 additions and 0 deletions

View File

@ -13,6 +13,7 @@
- fix possible DoS in op/op.RemoveLog.php
- show only calendar events of logged in user
- show expired documents in calendar
- call new hook 'cleanUpDocument' after uploading or updating a document
--------------------------------------------------------------------------------
Changes in version 5.1.24

View File

@ -414,6 +414,9 @@ foreach($file_ary as $file) {
}
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),$errmsg);
} else {
if($controller->hasHook('cleanUpDocument')) {
$controller->callHook('cleanUpDocument', $document, $file);
}
// Send notification to subscribers of folder.
if($notifier) {
$notifier->sendNewDocumentMail($document, $user);

View File

@ -318,6 +318,9 @@ default:
if(!$content = $controller->run()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
} else {
if($controller->hasHook('cleanUpDocument')) {
$controller->callHook('cleanUpDocument', $document, $file);
}
// Send notification to subscribers.
if($notifier) {
$notifier->sendNewDocumentVersionMail($document, $user);