|
@@ -1,5 +1,5 @@
|
|
|
<?php
|
|
|
-// Copyright (C) 2010-2016 Combodo SARL
|
|
|
+// Copyright (C) 2010-2017 Combodo SARL
|
|
|
//
|
|
|
// This file is part of iTop.
|
|
|
//
|
|
@@ -20,7 +20,7 @@
|
|
|
/**
|
|
|
* Class cmdbObject
|
|
|
*
|
|
|
- * @copyright Copyright (C) 2010-2016 Combodo SARL
|
|
|
+ * @copyright Copyright (C) 2010-2017 Combodo SARL
|
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
|
*/
|
|
|
|
|
@@ -231,206 +231,219 @@ abstract class CMDBObject extends DBObject
|
|
|
$iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
}
|
|
|
|
|
|
- protected function RecordAttChanges(array $aValues, array $aOrigValues)
|
|
|
+ /**
|
|
|
+ * @param $sAttCode
|
|
|
+ * @param $original Original value
|
|
|
+ * @param $value Current value
|
|
|
+ */
|
|
|
+ protected function RecordAttChange($sAttCode, $original, $value)
|
|
|
{
|
|
|
- parent::RecordAttChanges($aValues, $aOrigValues);
|
|
|
+ $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
|
|
|
+ if ($oAttDef->IsExternalField()) return;
|
|
|
+ if ($oAttDef->IsLinkSet()) return;
|
|
|
+ if ($oAttDef->GetTrackingLevel() == ATTRIBUTE_TRACKING_NONE) return;
|
|
|
|
|
|
- // $aValues is an array of $sAttCode => $value
|
|
|
- //
|
|
|
- foreach ($aValues as $sAttCode=> $value)
|
|
|
+ if ($oAttDef instanceOf AttributeOneWayPassword)
|
|
|
{
|
|
|
- $oAttDef = MetaModel::GetAttributeDef(get_class($this), $sAttCode);
|
|
|
- if ($oAttDef->IsExternalField()) continue;
|
|
|
- if ($oAttDef->IsLinkSet()) continue;
|
|
|
- if ($oAttDef->GetTrackingLevel() == ATTRIBUTE_TRACKING_NONE) continue;
|
|
|
+ // One Way encrypted passwords' history is stored -one way- encrypted
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeOneWayPassword");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
|
|
|
- if (array_key_exists($sAttCode, $aOrigValues))
|
|
|
+ if (is_null($original))
|
|
|
{
|
|
|
- $original = $aOrigValues[$sAttCode];
|
|
|
+ $original = '';
|
|
|
}
|
|
|
- else
|
|
|
+ $oMyChangeOp->Set("prev_pwd", $original);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeEncryptedString)
|
|
|
+ {
|
|
|
+ // Encrypted string history is stored encrypted
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeEncrypted");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+
|
|
|
+ if (is_null($original))
|
|
|
{
|
|
|
- $original = null;
|
|
|
+ $original = '';
|
|
|
}
|
|
|
+ $oMyChangeOp->Set("prevstring", $original);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeBlob)
|
|
|
+ {
|
|
|
+ // Data blobs
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeBlob");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
|
|
|
- if ($oAttDef instanceOf AttributeOneWayPassword)
|
|
|
+ if (is_null($original))
|
|
|
{
|
|
|
- // One Way encrypted passwords' history is stored -one way- encrypted
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeOneWayPassword");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
-
|
|
|
- if (is_null($original))
|
|
|
- {
|
|
|
- $original = '';
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("prev_pwd", $original);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $original = new ormDocument();
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeEncryptedString)
|
|
|
+ $oMyChangeOp->Set("prevdata", $original);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeStopWatch)
|
|
|
+ {
|
|
|
+ // Stop watches - record changes for sub items only (they are visible, the rest is not visible)
|
|
|
+ //
|
|
|
+ foreach ($oAttDef->ListSubItems() as $sSubItemAttCode => $oSubItemAttDef)
|
|
|
{
|
|
|
- // Encrypted string history is stored encrypted
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeEncrypted");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+ $item_value = $oAttDef->GetSubItemValue($oSubItemAttDef->Get('item_code'), $value, $this);
|
|
|
+ $item_original = $oAttDef->GetSubItemValue($oSubItemAttDef->Get('item_code'), $original, $this);
|
|
|
|
|
|
- if (is_null($original))
|
|
|
+ if ($item_value != $item_original)
|
|
|
{
|
|
|
- $original = '';
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeScalar");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sSubItemAttCode);
|
|
|
+
|
|
|
+ $oMyChangeOp->Set("oldvalue", $item_original);
|
|
|
+ $oMyChangeOp->Set("newvalue", $item_value);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
}
|
|
|
- $oMyChangeOp->Set("prevstring", $original);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeBlob)
|
|
|
- {
|
|
|
- // Data blobs
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeBlob");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeCaseLog)
|
|
|
+ {
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeCaseLog");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
|
|
|
- if (is_null($original))
|
|
|
- {
|
|
|
- $original = new ormDocument();
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("prevdata", $original);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
- }
|
|
|
- elseif ($oAttDef instanceOf AttributeStopWatch)
|
|
|
+ $oMyChangeOp->Set("lastentry", $value->GetLatestEntryIndex());
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeLongText)
|
|
|
+ {
|
|
|
+ // Data blobs
|
|
|
+ if ($oAttDef->GetFormat() == 'html')
|
|
|
{
|
|
|
- // Stop watches - record changes for sub items only (they are visible, the rest is not visible)
|
|
|
- //
|
|
|
- foreach ($oAttDef->ListSubItems() as $sSubItemAttCode => $oSubItemAttDef)
|
|
|
- {
|
|
|
- $item_value = $oAttDef->GetSubItemValue($oSubItemAttDef->Get('item_code'), $value, $this);
|
|
|
- $item_original = $oAttDef->GetSubItemValue($oSubItemAttDef->Get('item_code'), $original, $this);
|
|
|
-
|
|
|
- if ($item_value != $item_original)
|
|
|
- {
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeScalar");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sSubItemAttCode);
|
|
|
-
|
|
|
- $oMyChangeOp->Set("oldvalue", $item_original);
|
|
|
- $oMyChangeOp->Set("newvalue", $item_value);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
- }
|
|
|
- }
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeHTML");
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeCaseLog)
|
|
|
+ else
|
|
|
{
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeCaseLog");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
-
|
|
|
- $oMyChangeOp->Set("lastentry", $value->GetLatestEntryIndex());
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeLongText");
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeLongText)
|
|
|
- {
|
|
|
- // Data blobs
|
|
|
- if ($oAttDef->GetFormat() == 'html')
|
|
|
- {
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeHTML");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeLongText");
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
|
|
|
- if (!is_null($original) && ($original instanceof ormCaseLog))
|
|
|
- {
|
|
|
- $original = $original->GetText();
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("prevdata", $original);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
- }
|
|
|
- elseif ($oAttDef instanceOf AttributeText)
|
|
|
+ if (!is_null($original) && ($original instanceof ormCaseLog))
|
|
|
{
|
|
|
- // Data blobs
|
|
|
- if ($oAttDef->GetFormat() == 'html')
|
|
|
- {
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeHTML");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeText");
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
-
|
|
|
- if (!is_null($original) && ($original instanceof ormCaseLog))
|
|
|
- {
|
|
|
- $original = $original->GetText();
|
|
|
- }
|
|
|
- $oMyChangeOp->Set("prevdata", $original);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $original = $original->GetText();
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeBoolean)
|
|
|
+ $oMyChangeOp->Set("prevdata", $original);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeText)
|
|
|
+ {
|
|
|
+ // Data blobs
|
|
|
+ if ($oAttDef->GetFormat() == 'html')
|
|
|
{
|
|
|
- $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();
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeHTML");
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeHierarchicalKey)
|
|
|
+ else
|
|
|
{
|
|
|
- // 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();
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeText");
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeCustomFields)
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+
|
|
|
+ if (!is_null($original) && ($original instanceof ormCaseLog))
|
|
|
{
|
|
|
- // Custom fields
|
|
|
- //
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeCustomFields");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
- $oMyChangeOp->Set("prevdata", json_encode($original->GetValues()));
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $original = $original->GetText();
|
|
|
}
|
|
|
- elseif ($oAttDef instanceOf AttributeURL)
|
|
|
+ $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();
|
|
|
+ }
|
|
|
+ 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();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeCustomFields)
|
|
|
+ {
|
|
|
+ // Custom fields
|
|
|
+ //
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeCustomFields");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+ $oMyChangeOp->Set("prevdata", json_encode($original->GetValues()));
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ elseif ($oAttDef instanceOf AttributeURL)
|
|
|
+ {
|
|
|
+ // URLs
|
|
|
+ //
|
|
|
+ $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeURL");
|
|
|
+ $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
+ $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
+ $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
+ $oMyChangeOp->Set("oldvalue", $original);
|
|
|
+ $oMyChangeOp->Set("newvalue", $value);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ // Scalars
|
|
|
+ //
|
|
|
+ $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);
|
|
|
+ $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @param array $aValues
|
|
|
+ * @param array $aOrigValues
|
|
|
+ */
|
|
|
+ protected function RecordAttChanges(array $aValues, array $aOrigValues)
|
|
|
+ {
|
|
|
+ parent::RecordAttChanges($aValues, $aOrigValues);
|
|
|
+
|
|
|
+ // $aValues is an array of $sAttCode => $value
|
|
|
+ //
|
|
|
+ foreach ($aValues as $sAttCode=> $value)
|
|
|
+ {
|
|
|
+ if (array_key_exists($sAttCode, $aOrigValues))
|
|
|
{
|
|
|
- // URLs
|
|
|
- //
|
|
|
- $oMyChangeOp = MetaModel::NewObject("CMDBChangeOpSetAttributeURL");
|
|
|
- $oMyChangeOp->Set("objclass", get_class($this));
|
|
|
- $oMyChangeOp->Set("objkey", $this->GetKey());
|
|
|
- $oMyChangeOp->Set("attcode", $sAttCode);
|
|
|
- $oMyChangeOp->Set("oldvalue", $original);
|
|
|
- $oMyChangeOp->Set("newvalue", $value);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $original = $aOrigValues[$sAttCode];
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- // Scalars
|
|
|
- //
|
|
|
- $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);
|
|
|
- $iId = $oMyChangeOp->DBInsertNoReload();
|
|
|
+ $original = null;
|
|
|
}
|
|
|
+ $this->RecordAttChange($sAttCode, $original, $value);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -596,6 +609,30 @@ abstract class CMDBObject extends DBObject
|
|
|
}
|
|
|
return $ret;
|
|
|
}
|
|
|
+
|
|
|
+ public function DBArchive()
|
|
|
+ {
|
|
|
+ // Note: do the job anyway, so as to repair any DB discrepancy
|
|
|
+ $bOriginal = $this->Get('archive_flag');
|
|
|
+ parent::DBArchive();
|
|
|
+
|
|
|
+ if (!$bOriginal)
|
|
|
+ {
|
|
|
+ $this->RecordAttChange('archive_flag', false, true);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ public function DBUnarchive()
|
|
|
+ {
|
|
|
+ // Note: do the job anyway, so as to repair any DB discrepancy
|
|
|
+ $bOriginal = $this->Get('archive_flag');
|
|
|
+ parent::DBUnarchive();
|
|
|
+
|
|
|
+ if ($bOriginal)
|
|
|
+ {
|
|
|
+ $this->RecordAttChange('archive_flag', true, false);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -649,5 +686,5 @@ class CMDBObjectSet extends DBObjectSet
|
|
|
$oRetSet->AddObjectExtended($aObjectsByClassAlias);
|
|
|
}
|
|
|
return $oRetSet;
|
|
|
- }
|
|
|
+ }
|
|
|
}
|