Index: trunk/core/units/general/cat_event_handler.php =================================================================== diff -u -N -r4243 -r4287 --- trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4243) +++ trunk/core/units/general/cat_event_handler.php (.../cat_event_handler.php) (revision 4287) @@ -37,22 +37,18 @@ return; } - //recalling by different name, because we may get kDBList, if we recall just by prefix - $object =& $this->Application->recallObject($event->getPrefixSpecial().'.item', $event->Prefix); -// $this->prepareObject($object, $event); + $ids_arr = explode(',', $ids); if ($this->Application->RecallVar($event->getPrefixSpecial().'_clipboard_mode') == 'copy') { - $ids_arr = explode(',', $ids); - $temp =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler'); - if($ids_arr) - { + if ($ids_arr) { $temp->CloneItems($event->Prefix, $event->Special, $ids_arr); } } else { // mode == cut - $ids_arr = explode(',', $ids); + $object =& $this->Application->recallObject($event->getPrefixSpecial().'.item', $event->Prefix, Array('skip_autoload' => true)); + foreach ($ids_arr as $id) { $object->Load($id); $object->MoveToCat(); @@ -137,7 +133,7 @@ 'trans_multi_line' => $this->Application->GetVar('translator_multi_line'), ); - // 1. SAVE LAST TEMPLATE TO SESSION + // 1. SAVE LAST TEMPLATE TO SESSION (really needed here, because of tweaky redirect) $last_template = $this->Application->RecallVar('last_template'); preg_match('/index4\.php\|'.$this->Application->GetSID().'-(.*):/U', $last_template, $rets); $this->Application->StoreVar('return_template', $this->Application->GetVar('t')); @@ -1677,7 +1673,7 @@ $this->Application->SetVar('passed', $passed.','.$event->getPrefixSpecial()); $event->setEventParam('pass_events', true); - $this->finalizePopup($event, null, $this->getModuleFolder($event).'/'.$event->Special); + $this->finalizePopup($event); } @@ -1706,6 +1702,25 @@ /* === RELATED TO IMPORT/EXPORT: END === */ + /** + * Saves selected user in needed field + * + * @param kEvent $event + */ + function OnSelectUser(&$event) + { + $items_info = $this->Application->GetVar('u'); + if ($items_info) { + $user_id = array_shift( array_keys($items_info) ); + + $object =& $event->getObject(); + $object->SetDBField($this->Application->RecallVar('dst_field'), $user_id); + $object->Update(); + } + + $this->finalizePopup($event); + } + } ?> \ No newline at end of file