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:
Guillaume Lajarige
2017-08-25 13:06:21 +00:00
parent a39789cf89
commit b02d347541
2 changed files with 42 additions and 6 deletions

View File

@@ -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)
{