Protection against reentrance for DBUpdate

This commit is contained in:
Eric Espie
2022-05-30 17:03:47 +02:00
parent af4a5e1b8d
commit aed8337c51
4 changed files with 35 additions and 24 deletions

View File

@@ -4488,7 +4488,7 @@ HTML;
// Protection against reentrance (e.g. cascading the update of ticket logs)
// Note: This is based on the fix made on r 3190 in DBObject::DBUpdate()
if (!MetaModel::StartReentranceProtection($this)) {
if (!MetaModel::StartReentranceProtection(Metamodel::REENTRANCE_TYPE_UPDATE, $this)) {
$sClass = get_class($this);
$sKey = $this->GetKey();
IssueLog::Debug("CRUD: DBUpdate $sClass::$sKey Rejected (reentrance)", LogChannels::DM_CRUD);
@@ -4507,7 +4507,7 @@ HTML;
}
finally
{
MetaModel::StopReentranceProtection($this);
MetaModel::StopReentranceProtection(Metamodel::REENTRANCE_TYPE_UPDATE, $this);
}
if ($this->IsModified()) {