Fix trigger on setValueFrom
Load updated values into object for trigger.
This commit is contained in:
parent
002181190c
commit
81ef355b65
@ -1457,7 +1457,16 @@ abstract class CommonObject
|
|||||||
{
|
{
|
||||||
if ($trigkey)
|
if ($trigkey)
|
||||||
{
|
{
|
||||||
$result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
// call trigger with updated object values
|
||||||
|
if (empty($this->get_field_list()) && method_exists($this, 'fetch'))
|
||||||
|
{
|
||||||
|
$result = $this->fetch($id);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$result = $this->fetchCommon($id);
|
||||||
|
}
|
||||||
|
if ($result >= 0) $result=$this->call_trigger($trigkey, (! empty($fuser) && is_object($fuser)) ? $fuser : $user); // This may set this->errors
|
||||||
if ($result < 0) $error++;
|
if ($result < 0) $error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user