Fix for Trac #497: allow bulk modification of "duration" fields.

- Proper display of the modifications on the SynchroAttributes in the History of a SynchroDataSource
- Better display of the history of Boolean atrtibutes (false is no longer displayed as an empty string)

SVN:trunk[2478]
This commit is contained in:
Denis Flaven
2012-11-28 17:45:00 +00:00
parent 323147c7f4
commit 63cb32b7a7
6 changed files with 45 additions and 7 deletions

View File

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