pass 'add' or 'update' to hook 'addDocumentContentFile'

This commit is contained in:
Uwe Steinmann 2022-04-14 17:00:44 +02:00
parent 0198955905
commit 612a6d1473
3 changed files with 3 additions and 2 deletions

View File

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

@ -399,7 +399,7 @@ console.log(params);
$this->getDropFolderChooserHtml("adddocform", $dropfolderfile)
);
}
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

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