Merge branch 'seeddms-5.1.x' into seeddms-6.0.x

This commit is contained in:
Uwe Steinmann 2022-04-14 17:01:34 +02:00
commit eca2701da1
5 changed files with 10 additions and 2 deletions

View File

@ -232,6 +232,8 @@
- 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
- pass 'add' or 'update' to hook 'addDocumentContentFile'
--------------------------------------------------------------------------------
Changes in version 5.1.24

View File

@ -490,6 +490,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

@ -383,6 +383,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);

View File

@ -419,7 +419,7 @@ console.log(params);
$this->getDocumentChooserHtml("adddocform", M_READ, -1, null, 'librarydoc', $libraryfolder, 1)
);
}
if($arr = $this->callHook('addDocumentContentFile')) {
if($arr = $this->callHook('addDocumentContentFile', 'add')) {
foreach($arr as $ar)
if(is_array($ar)) {
$this->formField($ar[0], $ar[1], isset($ar[2]) ? $ar[2] : null);

View File

@ -240,7 +240,7 @@ console.log(element);
$this->getDropFolderChooserHtml("form1")
);
}
if($arr = $this->callHook('addDocumentContentFile')) {
if($arr = $this->callHook('addDocumentContentFile', 'update')) {
foreach($arr as $ar)
if(is_array($ar)) {
$this->formField($ar[0], $ar[1], isset($ar[2]) ? $ar[2] : null);