mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 09:38:48 +02:00
DBObject->GetOriginal() hardening (now support attributes not set: for example sla_tto_passed for UserRequest until it is closed)
SVN:trunk[5932]
This commit is contained in:
@@ -112,6 +112,26 @@ class ItopDataTestCase extends ItopTestCase
|
||||
return $oMyObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $sClass
|
||||
* @param $iKey
|
||||
* @param array $aParams
|
||||
*
|
||||
* @return DBObject
|
||||
* @throws \ArchivedObjectException
|
||||
* @throws \CoreException
|
||||
* @throws \CoreUnexpectedValue
|
||||
*/
|
||||
protected static function updateObject($sClass, $iKey, $aParams)
|
||||
{
|
||||
$oMyObj = MetaModel::GetObject($sClass, $iKey);
|
||||
foreach($aParams as $sAttCode => $oValue)
|
||||
{
|
||||
$oMyObj->Set($sAttCode, $oValue);
|
||||
}
|
||||
$oMyObj->DBUpdate();
|
||||
return $oMyObj;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an Organization in database
|
||||
|
||||
Reference in New Issue
Block a user