mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
fix дополнительных полей
This commit is contained in:
parent
dcc4a7443f
commit
7b9c373f9c
|
@ -434,13 +434,6 @@ class ModuleProperty extends ModuleORM
|
||||||
if (!$oEntityFirst->property) {
|
if (!$oEntityFirst->property) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$sTargetType = $oEntityFirst->property->getPropertyTargetType();
|
|
||||||
/**
|
|
||||||
* Проверяем зарегистрирован ли такой тип
|
|
||||||
*/
|
|
||||||
if (!$this->IsAllowTargetType($sTargetType)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* Проверяем необходимость цеплять свойства
|
* Проверяем необходимость цеплять свойства
|
||||||
*/
|
*/
|
||||||
|
@ -448,8 +441,11 @@ class ModuleProperty extends ModuleORM
|
||||||
$aEntitiesId = array();
|
$aEntitiesId = array();
|
||||||
$aTargetTypes = array();
|
$aTargetTypes = array();
|
||||||
foreach ($aEntitiesWork as $oEntity) {
|
foreach ($aEntitiesWork as $oEntity) {
|
||||||
$aEntitiesId[] = $oEntity->getId();
|
$sTargetType = $oEntity->property->getPropertyTargetType();
|
||||||
$aTargetTypes[] = $oEntity->getPropertyTargetType();
|
if ($this->IsAllowTargetType($sTargetType)) {
|
||||||
|
$aEntitiesId[] = $oEntity->getId();
|
||||||
|
$aTargetTypes[] = $sTargetType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$aTargetTypes = array_unique($aTargetTypes);
|
$aTargetTypes = array_unique($aTargetTypes);
|
||||||
/**
|
/**
|
||||||
|
@ -488,6 +484,9 @@ class ModuleProperty extends ModuleORM
|
||||||
foreach ($aEntitiesWork as $oEntity) {
|
foreach ($aEntitiesWork as $oEntity) {
|
||||||
$aPropertiesClone = array();
|
$aPropertiesClone = array();
|
||||||
foreach ($aProperties as $oProperty) {
|
foreach ($aProperties as $oProperty) {
|
||||||
|
if ($oEntity->property->getPropertyTargetType() != $oProperty->getTargetType()) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
$oPropertyNew = clone $oProperty;
|
$oPropertyNew = clone $oProperty;
|
||||||
$sKey = $oProperty->getId() . '_' . $oEntity->getId();
|
$sKey = $oProperty->getId() . '_' . $oEntity->getId();
|
||||||
if (isset($aValues[$sKey])) {
|
if (isset($aValues[$sKey])) {
|
||||||
|
|
Loading…
Reference in a new issue