Reintegrated changes from trunk:

- Issue with the change tracking of ext keys
- Fix on AttributeDecimal
- Handle various sources for object messages (session)

SVN:2.0[2642]
This commit is contained in:
Romain Quetiez
2013-03-20 08:42:26 +00:00
parent b038ef5a73
commit d2f9458516
4 changed files with 679 additions and 587 deletions

View File

@@ -322,6 +322,18 @@ abstract class CMDBObject extends DBObject
$oMyChangeOp->Set("newvalue", $value ? 1 : 0);
$iId = $oMyChangeOp->DBInsertNoReload();
}
elseif ($oAttDef instanceOf AttributeHierarchicalKey)
{
// Hierarchical keys
//
$oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeScalar");
$oMyChangeOp->Set("objclass", get_class($this));
$oMyChangeOp->Set("objkey", $this->GetKey());
$oMyChangeOp->Set("attcode", $sAttCode);
$oMyChangeOp->Set("oldvalue", $original);
$oMyChangeOp->Set("newvalue", $value[$sAttCode]);
$iId = $oMyChangeOp->DBInsertNoReload();
}
else
{
// Scalars