mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-20 09:08:42 +02:00
N°4756 - Ease extensibility for CRUD operations : Protect against update loops
This commit is contained in:
@@ -4440,7 +4440,8 @@ HTML;
|
||||
MetaModel::StopReentranceProtection(Metamodel::REENTRANCE_TYPE_UPDATE, $this);
|
||||
}
|
||||
|
||||
if ($this->IsModified()) {
|
||||
$aChanges = $this->ListChanges();
|
||||
if (count($aChanges) != 0) {
|
||||
$this->iUpdateLoopCount++;
|
||||
if ($this->iUpdateLoopCount > self::MAX_UPDATE_LOOP_COUNT) {
|
||||
$sClass = get_class($this);
|
||||
|
||||
@@ -5976,7 +5976,7 @@ abstract class DBObject implements iDisplay
|
||||
*/
|
||||
protected function GetExtensionsAttributeFlags(string $sAttCode, array &$aReasons, string $sTargetState): int
|
||||
{
|
||||
return 0;
|
||||
return OPT_ATT_NORMAL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5988,7 +5988,7 @@ abstract class DBObject implements iDisplay
|
||||
*/
|
||||
protected function GetExtensionsInitialStateAttributeFlags(string $sAttCode, array &$aReasons): int
|
||||
{
|
||||
return 0;
|
||||
return OPT_ATT_NORMAL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user