mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 20:51:30 +00:00
add new hook cleanUpDocument
This commit is contained in:
parent
7a0f2a784e
commit
0198955905
|
@ -13,6 +13,7 @@
|
||||||
- fix possible DoS in op/op.RemoveLog.php
|
- fix possible DoS in op/op.RemoveLog.php
|
||||||
- show only calendar events of logged in user
|
- show only calendar events of logged in user
|
||||||
- show expired documents in calendar
|
- show expired documents in calendar
|
||||||
|
- call new hook 'cleanUpDocument' after uploading or updating a document
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
Changes in version 5.1.24
|
Changes in version 5.1.24
|
||||||
|
|
|
@ -414,6 +414,9 @@ foreach($file_ary as $file) {
|
||||||
}
|
}
|
||||||
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),$errmsg);
|
UI::exitError(getMLText("folder_title", array("foldername" => $folder->getName())),$errmsg);
|
||||||
} else {
|
} else {
|
||||||
|
if($controller->hasHook('cleanUpDocument')) {
|
||||||
|
$controller->callHook('cleanUpDocument', $document, $file);
|
||||||
|
}
|
||||||
// Send notification to subscribers of folder.
|
// Send notification to subscribers of folder.
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
$notifier->sendNewDocumentMail($document, $user);
|
$notifier->sendNewDocumentMail($document, $user);
|
||||||
|
|
|
@ -318,6 +318,9 @@ default:
|
||||||
if(!$content = $controller->run()) {
|
if(!$content = $controller->run()) {
|
||||||
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
|
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));
|
||||||
} else {
|
} else {
|
||||||
|
if($controller->hasHook('cleanUpDocument')) {
|
||||||
|
$controller->callHook('cleanUpDocument', $document, $file);
|
||||||
|
}
|
||||||
// Send notification to subscribers.
|
// Send notification to subscribers.
|
||||||
if($notifier) {
|
if($notifier) {
|
||||||
$notifier->sendNewDocumentVersionMail($document, $user);
|
$notifier->sendNewDocumentVersionMail($document, $user);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user