From 7b9c373f9cee7b2836053a308db6eab862e59efc Mon Sep 17 00:00:00 2001 From: Mzhelskiy Maxim Date: Fri, 17 Mar 2017 12:56:30 +0700 Subject: [PATCH] =?UTF-8?q?fix=20=D0=B4=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D1=85=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=BB=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../classes/modules/property/Property.class.php | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/application/classes/modules/property/Property.class.php b/application/classes/modules/property/Property.class.php index 06a2b573..d1c9bc7a 100644 --- a/application/classes/modules/property/Property.class.php +++ b/application/classes/modules/property/Property.class.php @@ -434,13 +434,6 @@ class ModuleProperty extends ModuleORM if (!$oEntityFirst->property) { return; } - $sTargetType = $oEntityFirst->property->getPropertyTargetType(); - /** - * Проверяем зарегистрирован ли такой тип - */ - if (!$this->IsAllowTargetType($sTargetType)) { - return; - } /** * Проверяем необходимость цеплять свойства */ @@ -448,8 +441,11 @@ class ModuleProperty extends ModuleORM $aEntitiesId = array(); $aTargetTypes = array(); foreach ($aEntitiesWork as $oEntity) { - $aEntitiesId[] = $oEntity->getId(); - $aTargetTypes[] = $oEntity->getPropertyTargetType(); + $sTargetType = $oEntity->property->getPropertyTargetType(); + if ($this->IsAllowTargetType($sTargetType)) { + $aEntitiesId[] = $oEntity->getId(); + $aTargetTypes[] = $sTargetType; + } } $aTargetTypes = array_unique($aTargetTypes); /** @@ -488,6 +484,9 @@ class ModuleProperty extends ModuleORM foreach ($aEntitiesWork as $oEntity) { $aPropertiesClone = array(); foreach ($aProperties as $oProperty) { + if ($oEntity->property->getPropertyTargetType() != $oProperty->getTargetType()) { + continue; + } $oPropertyNew = clone $oProperty; $sKey = $oProperty->getId() . '_' . $oEntity->getId(); if (isset($aValues[$sKey])) {