Merge remote-tracking branch 'origin/master' into develop

# Conflicts:
#	core/expressioncache.class.inc.php
This commit is contained in:
Pierre Goiffon
2019-02-21 17:24:37 +01:00
17 changed files with 193 additions and 53 deletions

View File

@@ -1224,6 +1224,10 @@ abstract class DBObject implements iDisplay
if ($this->InSyncScope())
{
$iSynchroFlags = $this->GetSynchroReplicaFlags($sAttCode, $aReasons);
if ($iSynchroFlags & OPT_ATT_SLAVE)
{
$iSynchroFlags |= OPT_ATT_READONLY;
}
}
return $iFlags | $iSynchroFlags; // Combine both sets of flags
}
@@ -3869,7 +3873,7 @@ abstract class DBObject implements iDisplay
foreach(MetaModel::ListAttributeDefs($sLinkClass) as $sAttCode => $oAttDef)
{
// As of now, ignore other attribute (do not attempt to recurse!)
if ($oAttDef->IsScalar())
if ($oAttDef->IsScalar() && $oAttDef->IsWritable())
{
$oLinkClone->Set($sAttCode, $oSourceLink->Get($sAttCode));
}
@@ -3932,7 +3936,7 @@ abstract class DBObject implements iDisplay
$oObjectToRead = $aSourceObjects['source'];
foreach(MetaModel::ListAttributeDefs(get_class($this)) as $sAttCode => $oAttDef)
{
if ($oAttDef->IsScalar())
if ($oAttDef->IsScalar() && $oAttDef->IsWritable())
{
$this->CopyAttribute($oObjectToRead, $sAttCode, $sAttCode);
}