Add showdocument hook

This commit is contained in:
fr69400 2021-09-21 18:47:34 +02:00
parent a5566473d9
commit c4dd6be9f8

View File

@ -391,6 +391,20 @@ class FormFile
global $langs, $conf, $user, $hookmanager;
global $form;
$reshook = 0;
if (is_object($hookmanager)){
$parameters = array();
+ $reshook = $hookmanager->executeHooks('showdocuments', $parameters, $object);
// May report error
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
}
// Remode default action if $reskook > 0
if ($reshook > 0) {
return '';
}
if (!is_object($form)) {
$form = new Form($this->db);
}