mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 14:50:48 +03:00
fix дополнительных полей
This commit is contained in:
parent
dcc4a7443f
commit
7b9c373f9c
|
@ -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])) {
|
||||
|
|
Loading…
Reference in a new issue