|
@@ -229,10 +229,10 @@ |
|
|
block discarded – undo |
|
229
|
229
|
$link_properties = $new_type_reflector->get_link_properties(); |
|
230
|
230
|
$type_to_link_to = midcom_helper_reflector::class_rewrite($this->_object->__mgdschema_class_name__); |
|
231
|
231
|
foreach ($link_properties as $child_property => $link) { |
|
232
|
|
- if ( ($link['type'] == MGD_TYPE_GUID && $link['class'] === null) |
|
|
232
|
+ if (($link['type'] == MGD_TYPE_GUID && $link['class'] === null) |
|
233
|
233
|
|| midcom_helper_reflector::is_same_class(midcom_helper_reflector::class_rewrite($link['class']), $type_to_link_to)) { |
|
234
|
234
|
$defaults[$child_property] = $this->_object->{$link['target']}; |
|
235
|
|
- } elseif ( $child_property == $parent_property |
|
|
235
|
+ } elseif ($child_property == $parent_property |
|
236
|
236
|
&& midcom_helper_reflector::is_same_class($new_type, $type_to_link_to)) { |
|
237
|
237
|
$defaults[$child_property] = $this->_object->$parent_property; |
|
238
|
238
|
} |
Please login to merge, or discard this patch.