mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°2163 DB*Tracked methods : modifications after review with Romain
Previous commit : 24eb82d1
Use \CMDBObject::SetTrackInfo
Move \CMDBObject::SetCurrentChange calls at the top most level of the stacks
Restore old behaviors that were removed in previous commit
This commit is contained in:
@@ -519,7 +519,6 @@ abstract class WebServicesBase
|
||||
/**
|
||||
* @param \CMDBObject $oTargetObj
|
||||
* @param string $sResultLabel
|
||||
* @param \CMDBChange $oChange
|
||||
* @param \WebServiceResult $oRes
|
||||
*
|
||||
* @throws \ArchivedObjectException
|
||||
@@ -531,14 +530,13 @@ abstract class WebServicesBase
|
||||
* @throws \OQLException
|
||||
* @throws \SecurityException
|
||||
*/
|
||||
protected function MyObjectInsert($oTargetObj, $sResultLabel, $oChange, &$oRes)
|
||||
protected function MyObjectInsert($oTargetObj, $sResultLabel, &$oRes)
|
||||
{
|
||||
if ($oRes->IsOk())
|
||||
{
|
||||
list($bRes, $aIssues) = $oTargetObj->CheckToWrite();
|
||||
if ($bRes)
|
||||
{
|
||||
$oTargetObj::SetCurrentChange($oChange);
|
||||
$iId = $oTargetObj->DBInsertNoReload();
|
||||
$oRes->LogInfo("Created object ".get_class($oTargetObj)."::$iId");
|
||||
$oRes->AddResultObject($sResultLabel, $oTargetObj);
|
||||
|
||||
Reference in New Issue
Block a user