Index: trunk/core/units/relationship/relationship_event_handler.php =================================================================== diff -u -N -r7391 -r7635 --- trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7391) +++ trunk/core/units/relationship/relationship_event_handler.php (.../relationship_event_handler.php) (revision 7635) @@ -65,7 +65,7 @@ $sql = 'SELECT ResourceId FROM '.$this->Application->getUnitOption($target_prefix, 'TableName').' - WHERE '.$this->Application->getUnitOption($target_prefix, 'IDField').' = '.$target_id; + WHERE '.$this->Application->getUnitOption($target_prefix, 'IDField').' IN ('.$target_id.')'; $target_id = $this->Conn->GetOne($sql); $target_type = $this->Application->getUnitOption($target_prefix, 'ItemType'); @@ -82,10 +82,10 @@ // place correct template in opener stack $source_prefix = $this->Application->getUnitOption($event->Prefix, 'ParentPrefix'); $template = $this->Application->getUnitOption($source_prefix, 'AdminTemplatePath').'/relations_edit'; - + $redirect_params = Array($event->Prefix.'_event' => 'OnNew', 'target_id' => $target_id, 'm_opener' => 's', 'target_type' => $target_type); $this->Application->EventManager->openerStackPush($template, $redirect_params, 'all,'.$event->Prefix); - + // $event->SetRedirectParam('popup_stay', 1); // if popup mode, then set this } } @@ -236,7 +236,7 @@ $prefix = 'c'; } if (!$this->Application->prefixRegistred($prefix)) continue; - + $configs[$prefix] = $this->Application->getUnitOptions($prefix); if($configs[$prefix] === false) unset($configs[$prefix]); if(!isset($configs[$prefix]['CatalogItem']) || !$configs[$prefix]['CatalogItem']) unset($configs[$prefix]);