NEW: Hook do actions or check input after changing a extrafield in commonobject.class.php (#30128)

* Integration Textbausteine weiter...

* fix typo.
This commit is contained in:
Christian Humpel 2024-06-23 18:00:44 +02:00 committed by GitHub
parent ede95c97fb
commit dafbefdc74
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6797,7 +6797,7 @@ abstract class CommonObject
*/
public function updateExtraField($key, $trigger = null, $userused = null)
{
global $conf, $langs, $user;
global $conf, $langs, $user, $hookmanager;
if (getDolGlobalString('MAIN_EXTRAFIELDS_DISABLED')) {
return 0;
@ -7063,6 +7063,14 @@ abstract class CommonObject
}
}
if (!$error) {
$parameters = array('key'=>$key);
$reshook = $hookmanager->executeHooks('updateExtraFieldBeforeCommit', $parameters, $this, $action);
if ($reshook < 0) {
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
}
}
if (!$error && $trigger) {
// Call trigger
$this->context = array('extrafieldupdate'=>1);