mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Archives: regression. Forms not working with various symptom having the same root cause: DBObject::Set issuing an exception "Attempting to set the value on the read-only attribute operational_status"
SVN:trunk[4721]
This commit is contained in:
@@ -364,7 +364,14 @@ abstract class DBObject implements iDisplay
|
||||
}
|
||||
return $bFullyLoaded;
|
||||
}
|
||||
|
||||
|
||||
protected function _Set($sAttCode, $value)
|
||||
{
|
||||
$this->m_aCurrValues[$sAttCode] = $value;
|
||||
$this->m_aTouchedAtt[$sAttCode] = true;
|
||||
unset($this->m_aModifiedAtt[$sAttCode]);
|
||||
}
|
||||
|
||||
public function Set($sAttCode, $value)
|
||||
{
|
||||
if ($sAttCode == 'finalclass')
|
||||
@@ -451,13 +458,11 @@ abstract class DBObject implements iDisplay
|
||||
|
||||
$realvalue = $oAttDef->MakeRealValue($value, $this);
|
||||
|
||||
$this->m_aCurrValues[$sAttCode] = $realvalue;
|
||||
$this->m_aTouchedAtt[$sAttCode] = true;
|
||||
unset($this->m_aModifiedAtt[$sAttCode]);
|
||||
$this->_Set($sAttCode, $realvalue);
|
||||
|
||||
foreach (MetaModel::ListMetaAttributes(get_class($this), $sAttCode) as $sMetaAttCode => $oMetaAttDef)
|
||||
{
|
||||
$this->Set($sMetaAttCode, $oMetaAttDef->MapValue($this));
|
||||
$this->_Set($sMetaAttCode, $oMetaAttDef->MapValue($this));
|
||||
}
|
||||
|
||||
// The object has changed, reset caches
|
||||
|
||||
Reference in New Issue
Block a user