Add showdocument hook
This commit is contained in:
parent
a5566473d9
commit
c4dd6be9f8
@ -391,6 +391,20 @@ class FormFile
|
|||||||
global $langs, $conf, $user, $hookmanager;
|
global $langs, $conf, $user, $hookmanager;
|
||||||
global $form;
|
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)) {
|
if (!is_object($form)) {
|
||||||
$form = new Form($this->db);
|
$form = new Form($this->db);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user