N°4756 - Ease extensibility for CRUD operations : 🎨 refactor after code review with PG

This commit is contained in:
Eric Espie
2023-01-26 17:32:02 +01:00
parent 5844717980
commit 1e37370789
13 changed files with 175 additions and 113 deletions

View File

@@ -4463,7 +4463,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(Metamodel::REENTRANCE_TYPE_UPDATE, $this)) {
if (!MetaModel::StartReentranceProtection($this)) {
$sClass = get_class($this);
$sKey = $this->GetKey();
IssueLog::Debug("CRUD: DBUpdate $sClass::$sKey Rejected (reentrance)", LogChannels::DM_CRUD);
@@ -4482,7 +4482,7 @@ HTML;
}
finally
{
MetaModel::StopReentranceProtection(Metamodel::REENTRANCE_TYPE_UPDATE, $this);
MetaModel::StopReentranceProtection($this);
}
$aChanges = $this->ListChanges();