pass propper parameter to hook cleanUpDocument

This commit is contained in:
Uwe Steinmann 2024-11-13 22:31:13 +01:00
parent 964bed081d
commit f5db14dd74

View File

@ -795,7 +795,7 @@ class RestapiController { /* {{{ */
return $response->withJson(array('success'=>false, 'message'=>'Upload failed', 'data'=>''), 500); return $response->withJson(array('success'=>false, 'message'=>'Upload failed', 'data'=>''), 500);
} else { } else {
if($controller->hasHook('cleanUpDocument')) { if($controller->hasHook('cleanUpDocument')) {
$controller->callHook('cleanUpDocument', $document, $file); $controller->callHook('cleanUpDocument', $document, ['ѕource'=>'restapi', 'type'=>$userfiletype, 'name'=>$origfilename]);
} }
// Send notification to subscribers of folder. // Send notification to subscribers of folder.
if($notifier) { if($notifier) {
@ -967,7 +967,7 @@ class RestapiController { /* {{{ */
} else { } else {
unlink($temp); unlink($temp);
if($controller->hasHook('cleanUpDocument')) { if($controller->hasHook('cleanUpDocument')) {
$controller->callHook('cleanUpDocument', $document, $file_info); $controller->callHook('cleanUpDocument', $document, ['ѕource'=>'restapi', 'type'=>$userfiletype, 'name'=>$origfilename]);
} }
// Send notification to subscribers. // Send notification to subscribers.
if($notifier) { if($notifier) {