mirror of
https://github.com/espocrm/espocrm.git
synced 2026-07-01 08:26:04 +00:00
entity manager: dont allow to change linkMultipleField if not custom
This commit is contained in:
@@ -475,7 +475,11 @@ class EntityManager
|
||||
throw new Error();
|
||||
}
|
||||
|
||||
if ($this->getMetadata()->get("entityDefs.{$entity}.links.{$link}.type") == 'hasMany') {
|
||||
if (
|
||||
$this->getMetadata()->get("entityDefs.{$entity}.links.{$link}.type") == 'hasMany'
|
||||
&&
|
||||
$this->getMetadata()->get("entityDefs.{$entity}.links.{$link}.isCustom")
|
||||
) {
|
||||
if (array_key_exists('linkMultipleField', $params)) {
|
||||
$linkMultipleField = $params['linkMultipleField'];
|
||||
$dataLeft = array(
|
||||
@@ -496,7 +500,11 @@ class EntityManager
|
||||
}
|
||||
}
|
||||
|
||||
if ($this->getMetadata()->get("entityDefs.{$entityForeign}.links.{$linkForeign}.type") == 'hasMany') {
|
||||
if (
|
||||
$this->getMetadata()->get("entityDefs.{$entityForeign}.links.{$linkForeign}.type") == 'hasMany'
|
||||
&&
|
||||
$this->getMetadata()->get("entityDefs.{$entityForeign}.links.{$linkForeign}.isCustom")
|
||||
) {
|
||||
if (array_key_exists('linkMultipleFieldForeign', $params)) {
|
||||
$linkMultipleFieldForeign = $params['linkMultipleFieldForeign'];
|
||||
$dataRight = array(
|
||||
|
||||
Reference in New Issue
Block a user