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:
parent
ede95c97fb
commit
dafbefdc74
1 changed files with 9 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue