Index: trunk/core/units/relationship/relationship_event_handler.php =================================================================== diff -u -N -r4303 -r4309 --- trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4303) +++ trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 4309) @@ -31,8 +31,13 @@ if($config_data['ItemType'] == $target['type']) break; } - $db =& $this->Application->GetADODBConnection(); - $item['name'] = $db->GetOne('SELECT '.$config_data['TitleField'].' FROM '.$config_data['TableName'].' WHERE ResourceId = '.$target['id']); + // this forces prepareOptions of kMultiLanguge formatter to substiture title field (if multilingual) of target item + // BUT this is not the solution, find out another way to get correct title field here + + $target_object =& $this->Application->recallObject($prefix, null, Array('skip_autoload' => true)); + $title_field = $this->Application->getUnitOption($prefix, 'TitleField'); + + $item['name'] = $this->Conn->GetOne('SELECT '.$title_field.' FROM '.$config_data['TableName'].' WHERE ResourceId = '.$target['id']); $item['type'] = $this->Application->Phrase($config_data['TitlePhrase']); $object->SetDBField('ItemName', $item['name']); $object->SetDBField('ItemType', $item['type']); @@ -46,7 +51,8 @@ $opener_stack = $opener_stack ? unserialize($opener_stack) : Array(); array_pop($opener_stack); - $new_level = 'index4.php|'.ltrim($this->Application->BuildEnv('in-commerce/products/products_relations',Array('m_opener'=>'u'),'all'),ENV_VAR_NAME.'='); + $return_template = $this->Application->RecallVar('return_template'); + $new_level = 'index4.php|'.ltrim($this->Application->BuildEnv($return_template, Array('m_opener'=>'u'),'all'),ENV_VAR_NAME.'='); array_push($opener_stack,$new_level); $this->Application->StoreVar('opener_stack',serialize($opener_stack));