mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 11:08:45 +02:00
N°977 DataSynchro: Creation and edition was broken due to the new object set API from ormLinkSet.
Backward compatible method have been introduce to ensure plugins and modules compatibility. That being said they are already flagged as deprecated and should not be used. New: Using those deprecated methods will raise a PHP deprecated error. SVN:trunk[4878]
This commit is contained in:
@@ -560,7 +560,7 @@ EOF
|
||||
elseif ($oAttribute instanceof SynchroAttLinkSet)
|
||||
{
|
||||
}
|
||||
$oAttributeSet->AddObject($oAttribute);
|
||||
$oAttributeSet->AddItem($oAttribute);
|
||||
}
|
||||
$this->Set('attribute_list', $oAttributeSet);
|
||||
}
|
||||
@@ -648,12 +648,11 @@ EOF
|
||||
|
||||
if (!is_null($oAttribute))
|
||||
{
|
||||
$oAttribute->Set('sync_source_id', $this->GetKey());
|
||||
$oAttribute->Set('attcode', $sAttCode);
|
||||
$oAttribute->Set('reconcile', MetaModel::IsReconcKey($this->GetTargetClass(), $sAttCode) ? 1 : 0);
|
||||
$oAttribute->Set('update', 1);
|
||||
$oAttribute->Set('update_policy', 'master_locked');
|
||||
$oAttributeSet->AddObject($oAttribute);
|
||||
$oAttributeSet->AddItem($oAttribute);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -677,9 +676,8 @@ EOF
|
||||
if ($this->Get('reconciliation_policy') == 'use_attributes')
|
||||
{
|
||||
$oSet = $this->Get('attribute_list');
|
||||
$oSynchroAttributeList = $oSet->ToArray();
|
||||
$bReconciliationKey = false;
|
||||
foreach($oSynchroAttributeList as $oSynchroAttribute)
|
||||
foreach($oSet as $oSynchroAttribute)
|
||||
{
|
||||
if ($oSynchroAttribute->Get('reconcile') == 1)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user